Refactor code according to the format in searching/lowerBound.cpp include the same headers. Create a class for each function