← 返回 netflix 的题目列表Sort Dictionary Keys
类型:online_judge
Given a dictionary, write code to sort the keys of the dictionary and return the sorted dictionary.
Sample Input:
{'z': 1, 'a': 3, 'b': 2}
Sample Output:
{'a': 3, 'b': 2, 'z': 1}
Requirements:
Do not use built-in sorting functions.
Up to 1000 key-value pairs allowed.
Example
Input
{'z': 1, 'a': 3, 'b': 2}