摘要:
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol... 阅读全文
摘要:
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... 阅读全文
摘要:
Given two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "anagram",t= "nagaram", return true.s= "rat",t= "car", retur... 阅读全文
摘要:
Implement a basic calculator to evaluate a simple expression string.The expression string contains onlynon-negativeintegers,+,-,*,/operators and empty... 阅读全文
摘要:
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th... 阅读全文
摘要:
Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.题意: 实现除法,但不允许用乘、除、以及取模运算。思路: 一下一下减必然显得... 阅读全文
摘要:
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted in asc... 阅读全文
摘要:
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord... 阅读全文