UCLA Interview Question

Some basic algorithms