摘要:
leetcode -Best Time to Buy and Sell Stock IISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to... 阅读全文
摘要:
leetcode -Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are struct... 阅读全文
摘要:
leetcode -Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path fro... 阅读全文
摘要:
leetcode -Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from... 阅读全文
摘要:
leetcode -Single Number IIGiven an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should ... 阅读全文
摘要:
leetcode -Single NumberGiven an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a li... 阅读全文
摘要:
Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3 + ... 阅读全文