I hereby claim:
- I am faheel on github.
- I am faheel (https://keybase.io/faheel) on keybase.
- I have a public key ASDFgbUmFE0IkyyHQkhke0NAMekP7or1tnH_WDkgyHSOSwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
cmake_minimum_required(VERSION 3.0) | |
project(BigInt) | |
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | |
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | |
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | |
set(BINARY_DIR ${CMAKE_SOURCE_DIR}/bin) | |
set(CMAKE_CXX_STANDARD 14) | |
set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic-errors") |
/* | |
Knuth-Morris-Pratt (KMP) algorithm: | |
A string searching algorithm that searches for a given "pattern" in a "text". | |
It uses the fact that when a mismatch occurs, one can jump further in the text | |
than a naive algorithm would (i.e. 1 step). The KMP algorithm can jump up to | |
all the length of the search pattern. | |
Time complexity: | |
O(N + M), where N is the pattern size and M is the text size. |