Question
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences.
[Read More]
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words.
[Read More]
Question
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.
[Read More]
Question
Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once.
[Read More]
Question
Given a non-empty array of integers, every element appears three times except for one, which appears exactly once. Find that single one.
[Read More]
Question
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put.
[Read More]