Tag: C/C++
Question: Given a string containing only numbers, restore it by returning all possible IP addresses (in a vector) Original Problem Page: http://oj.leetcode.com/problems/restore-ip-addresses/ Examples: Given "25525511135", return . (Order does not matter) A …
Question: Given an array and a element, remove all instances of that value in place and return the new length. The order of elements can be changed and it …
Question : Given a sorted list represented by a directional link structure (as follows), remove the duplicates and return the new list. /** * Definition for singly-linked list. * …
Question: You are climbing stairs. It takes n steps to get to the top. Each time, you can take 1 step or 2 steps. How many distinct ways to get to …
Question: Given an unsorted list of integers, find out the first missing positive. Problem Description: http://oj.leetcode.com/problems/first-missing-positive/ Examples: should return 3; should return 2. Can you do it with O(n) …