LeetCode
593 Valid Square
This is a pure math problem.
110 Balanced Binary Tree
I used recursion to solve this.
791 Custom Sort String
- to construct a string from char array:
String s = new String(chars);
- to access character by index:
char c0 = s[0]
- to convert a string to char array:
s.ToCharArray()
415 Add Strings
- convert char to integer:
(int) (c - '0')
- convert integer 0-9 to char:
(char) ((int) '0' + i)
TODO 93 Restore IP Address
- IP Address format: 32-bits, 0 - 255 for each number.