摘要:
Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace... 阅读全文
posted @ 2015-02-09 14:15
Vae永Silence
阅读(134)
评论(0)
推荐(0)
摘要:
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret... 阅读全文
posted @ 2015-02-09 14:14
Vae永Silence
阅读(114)
评论(0)
推荐(0)
摘要:
Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to... 阅读全文
posted @ 2015-02-09 14:13
Vae永Silence
阅读(133)
评论(0)
推荐(0)
摘要:
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-... 阅读全文
posted @ 2015-02-09 14:05
Vae永Silence
阅读(111)
评论(0)
推荐(0)
摘要:
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu... 阅读全文
posted @ 2015-02-09 14:03
Vae永Silence
阅读(143)
评论(0)
推荐(0)
摘要:
Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog... 阅读全文
posted @ 2015-02-09 14:02
Vae永Silence
阅读(202)
评论(0)
推荐(0)
摘要:
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.class Solution {public:int larges... 阅读全文
posted @ 2015-02-09 14:01
Vae永Silence
阅读(155)
评论(0)
推荐(0)
摘要:
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi... 阅读全文
posted @ 2015-02-09 14:00
Vae永Silence
阅读(183)
评论(0)
推荐(0)
摘要:
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation... 阅读全文
posted @ 2015-02-09 13:59
Vae永Silence
阅读(174)
评论(0)
推荐(0)
摘要:
Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal... 阅读全文
posted @ 2015-02-09 13:58
Vae永Silence
阅读(139)
评论(0)
推荐(0)