You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Understand what the interviewer is asking for by using test cases and questions about the problem.
P-lan
Plan the solution with appropriate visualizations and pseudocode.
General Idea: Create a dictionary from a list of keys (student names) and generate a unique ID for each value.
1) Create a new, empty dict
2) The current student ID starts at 1
3) For each student name:
a) In the new dict, map name -> current ID
b) Increment current ID by one
4) Return the new dict