Skip to content

Instantly share code, notes, and snippets.

@robconery
Created September 27, 2023 19:18
Show Gist options
  • Save robconery/071520de2325cc996fa5df0955f001d1 to your computer and use it in GitHub Desktop.
Save robconery/071520de2325cc996fa5df0955f001d1 to your computer and use it in GitHub Desktop.
Mission K-Range

This one is a bit tougher so don't feel bad if you don't finish. Again: the point is to demonstrate your thinking process and that you ask enough questions and think things through before you write any code.

Here’s the question:

You have k lists of sorted integers. Find the smallest range that includes at least one number from each of the k lists.

Here's some sample code

// For example,
list1 = [4, 10, 15, 24, 26];
list2 = [0, 9, 12, 20];
list3 = [5, 18, 22, 30];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment