Eddie Dong

Problem:
Given two sorted lists of intervals, List A and List B, the intervals in each list are not overlapped or disjoint. Find the overlapping intervals between A and B

Intuition:
When we see two sorted arrays/Lists, naturally we can think of anther problem that we know how to solve —…

--

--

Problem:
Instruction for a robot movement
L : turn left, R: turn right, G: go straight for 1 step
Given sequence of instruction will be repeated indefinitely.

Goal: given a sequence of instructions, check if robot forming a cycle.

Intuition:
if after one scan of execution, the robot faces different direction…

--

--

Goal: Find the numbers of subarrays that sum up to k. Array is an int array and has duplicates and negative numbers.

Intuition:
when negative numbers are allowed, then we cannot use the sliding window method because we can’t decide the right boundary of the window. Thus, we need a…

--

--