Infobean Interview Question

Write code to sort dictionary without using any inbuilt function?