摘要:
Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at 阅读全文
摘要:
Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target. E 阅读全文
摘要:
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 阅读全文
摘要:
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example:Given a = 1 and b = 2, return 3. 分析:不通过四则运算符号完 阅读全文
摘要:
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] 阅读全文
摘要:
Invert a binary tree. to Trivia:This problem was inspired by this original tweet by Max Howell: 分析:翻转二叉树 思路1: 使用递归的方式,时间复杂度为o(n),空间复杂度为o(n) JAVA CODE 阅读全文