Smarkets interview question

Write a code for popular data structure, write a function for some well-known algorithm.