Algorithm · Walmart Labs · Medium
Requirements The input is String[][] course, with each row formatted as [student_id, course_name]. Examine every distinct, unordered student pair and return the courses appearing in both of their sets. Pairs that have no courses in common must also be present. Use "smaller_id,larger_id" as each result key, and store the common courses in a List as its value. Any repeatable ordering of that list is fine, though you should be prepared to explain your choice. Examples The…
Checking your access…