摘要:
Description:Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Su... 阅读全文
摘要:
Description:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).Find the minimum e... 阅读全文
摘要:
Description:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Code:1 void revers... 阅读全文
摘要:
Description:Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?Code: 1 bool hasCycle(ListNo... 阅读全文
摘要:
Description:Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary word... 阅读全文
摘要:
Dscription:Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear r... 阅读全文
摘要:
Description:Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtim... 阅读全文
摘要:
Description:Given a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that surro... 阅读全文
摘要:
Description:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a... 阅读全文