標籤:Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => trueNote: It is intended for the problem statement to be ambiguous. You should gather all requirements up front
標籤:https://leetcode.com/problems/maximum-depth-of-binary-tree/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 the root node down to the farthest leaf
標籤:https://leetcode.com/problems/same-tree/Same Tree Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same
標籤:題目描述:You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and without any intervening characters. For
標籤:題目描述:Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.解題思路:把除數表示為:dividend = 2^i * divisor + 2^(i-1) * divisor + ... + 2^0 *
標籤:Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100".解題思路:JAVA實現如下:static public String addBinary(String a, String b) {if (a.length() < b.length()) {String temp = a;a = b;b = temp;}boolean