摘要:
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[−2,1,−3,4,−1,2,1,... 阅读全文
摘要:
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or... 阅读全文
摘要:
Given a binary tree, return theinordertraversal of its nodes' values.和preorder是一样的,把左子节点一直压入到栈中,直到没有左子节点为止,然后出栈访问,存储右子节点。 1 vector inorderTraversal(Tr... 阅读全文