Infobean interview question

Write code to sort dictionary without using any inbuilt function?