This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Based on http://www.geeksforgeeks.org/manachers-algorithm-linear-time-longest-palindromic-substring-part-4/ | |
// A C program to implement Manacher’s Algorithm | |
#include <stdio.h> | |
#include <string.h> | |
char text[100]; | |
int min(int a, int b) | |
{ | |
int res = a; | |
if (b < a) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int TICKS_PER_SECOND = 25; | |
const int MS_PER_TICK = 1000 / TICKS_PER_SECOND; | |
const int MAX_SKIPPED_FRAMES = 5; | |
void EngineInstance::run() { | |
this->last_tick_time = getTime() - TICKS_PER_SECOND; | |
while (this->shouldKeepRunning()) { | |
this->checkForUpdate(); |
NewerOlder