Session #CS-2847
LIVE
00:00
IR
Alex
CA
Riya
📄 Questions
Problems
Notes
Hints
01 Two Sum Easy

Given an array of integers nums and an integer target, return indices of the two numbers that add up to target. Exactly one solution exists, may not use the same element twice.

Input: nums=[2,7,11,15], target=9 Output: [0,1] // nums[0]+nums[1] == 9
Input: nums=[3,2,4], target=6 Output: [1,2]
TC 1[2,7,11,15], 9 → [0,1]
TC 2[3,2,4], 6 → [1,2]
TC 3[3,3], 6 → [0,1]
TC 4[1,5,3,2], 4 → [2,3]
  • 2 ≤ nums.length ≤ 10⁴
  • -10⁹ ≤ nums[i] ≤ 10⁹
  • Only one valid answer
02 Longest Substring Without Repeating Med

Given a string s, find the length of the longest substring without repeating characters.

Input: s = "abcabcbb" Output: 3 // "abc"
TC 1"abcabcbb" → 3
TC 2"bbbbb" → 1
TC 3"pwwkew" → 3
  • 0 ≤ s.length ≤ 5×10⁴
  • English letters, digits, symbols
03 Merge K Sorted Lists Hard

Given an array of k linked-lists, each sorted ascending, merge all into one sorted linked-list. Use a min-heap for O(N log k) efficiency.

TC 1[[1,4,5],[1,3,4],[2,6]] → [1,1,2,3,4,4,5,6]
TC 2[] → []
Alex is typing…
Test Results idle
Click Run to execute test cases
🎥 Video
Alex (IR)
Riya (CA)
💬 Chat
Session started · both participants connected
Alex09:12
Hi Riya! Let's start with Two Sum. Think aloud as you go 🙂
Riya09:13
Thanks! I'll use a hashmap — O(n) time, O(n) space.
Alex09:14
Perfect, go for it!
Riya09:16
Done! Should I add empty array edge case handling?