摘要:
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. 阅读全文
摘要:
Given a sorted linked list, delete all duplicates such that each element appear only once. 阅读全文
摘要:
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram. 阅读全文
摘要:
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice? 阅读全文
摘要:
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed? 阅读全文
摘要:
Given a 2D board and a word, find if the word exists in the grid. 阅读全文
摘要:
Given a set of distinct integers, S, return all possible subsets. 阅读全文
摘要:
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. 阅读全文
摘要:
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). 阅读全文
摘要:
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue. 阅读全文
摘要:
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from left to right.
The first integer of each row is greater than the last integer of the previous row. 阅读全文