Prompt: Given a head node to a linked list of integers, return a head node to a linked list that is the sorted version of the given linked list.
[Read More]
Prompt: Given a string with no spaces and a list of words, is it possible to break the strings in separate words that exist in the list of words.
[Read More]
Prompt: Given 2 arrays, a = [a0,a1,a2, …, an-1] and b = [b0,b1,b2, …, bn-1], the a array represents the amount of gas that is contained at gas station i and the b array represents the amount of gas needed to get to the next gas station ,in a clockwise...
[Read More]
Prompt: Given an mxn 2D array, each value is an integer that is either 0, 1, or 2.
0 represents an empty space.
1 represents a fresh orange.
2 represents a rotted orange.
[Read More]
Prompt: Given a list of n numbers, a peak element is an element where it’s greater than its neighbors. Find the peak element within O(log n) time. It can be assumed that the n + 1 th element is negative infinity.
[Read More]