摘要:
We want to use quad trees to store an N x N boolean grid. Each cell in the grid can only be true or false. The root node represents the whole grid. Fo 阅读全文
摘要:
Given an integer n, return the number of trailing zeroes in n!. Example 1: Example 2: 思考这类问题还是要从上而下思考,先用递归思路去解,最后修改循环或者dp。 另外的解法: Example Three By giv 阅读全文
摘要:
Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra spa 阅读全文
摘要:
Given a n-ary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest le 阅读全文
摘要:
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: tru 阅读全文
摘要:
We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wron 阅读全文