Back to problems

Sort Dictionary Keys

Algorithm · Netflix · Easy

Given a dictionary, create code that orders its entries by key and returns the resulting dictionary. Sample Input: Sample Output: Requirements: Built-in sorting operations must not be used. The dictionary can contain at most 1000 key-value entries. Example The keys appear in alphabetical order in the returned dictionary.

Checking your access…