摘要:
#题目简述:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the near... 阅读全文
摘要:
#题目简述:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given ... 阅读全文
摘要:
#题目简述:Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm t... 阅读全文
摘要:
#题目简述:Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. ... 阅读全文
摘要:
#题目简述:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal... 阅读全文
摘要:
#题目简述:Write a function to find the longest common prefix string amongst an array of strings.#解题思路: class Solution: # @return a string ... 阅读全文