摘要:
Given an array A of non-negative integers, half of the integers in A are odd, and half of the integers are even. Sort the array so that whenever A[i] 阅读全文
摘要:
Given an n-ary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example, given a 3-ary tree: 阅读全文
摘要:
Given a string S, return the "reversed" string where all characters that are not a letter stay in the same place, and all letters reverse their positi 阅读全文
摘要:
按序记录每棵树叶子节点。比较是否一致。 前序,中序,后序都可以。 Consider all the leaves of a binary tree. From left to right order, the values of those leaves form a leaf value sequ 阅读全文
摘要:
Example 1: Input: ["a","b","c","a","c","c"]Output: 3Explanation: 3 groups ["a","a"], ["b"], ["c","c","c"]Example 2: Input: ["aa","bb","ab","ba&qu 阅读全文
摘要:
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 阅读全文