add TernarySearch.cpp