add os directive for linux.
add algorithm header.