Interview Question type of algorithms