added sorting part to problem.cpp
Adding sorting part
commit