[LeetCode 100] Same Tree [Java]

2018-03-08

1. Description Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are ...


DFS

[LeetCode 79] Word Search [Java]

2018-03-04

1. Description Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent ...


DFS

[LeetCode 78] Subsets [Java]

2018-03-02

1. Description Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplica...


[LeetCode 77] Combinations [Java]

2018-02-28

1. Description Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. 2. Example If n = 4 and k = 2, a soluti...


[LeetCode 67] Add Binary [Java]

2018-02-18

1. Description Given two binary strings, return their sum (also a binary string). 2. Example a = "11" b = "1" Return "100". 3.Code public c...


[LeetCode 66] Plus One [Java]

2018-02-16

1. Description Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not ...


[LeetCode 65] Valid Number [Java]

2018-02-12

1. Description Validate if a given string is numeric. Note: It is intended for the problem statement to be ambiguous. You should gather all require...