forked from hongtaocai/code_interview
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotice.txt
More file actions
executable file
·53 lines (49 loc) · 902 Bytes
/
notice.txt
File metadata and controls
executable file
·53 lines (49 loc) · 902 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
1.
Initialization
2.
Arr: length,
Collections: size(),
String: length();
3.
Integer.MAX_VALUE;
4.
break & continue;
5.
Ascending sort;
a < b return a-b;
6.
When converting between number and string. consider the special cases.
When exchange numbers, exchange their lengths;
7.
if(map.keySet().contains(chare))
8.
boolean
9.
Tree height ++;
10.
Find the max/min : from 1;
11.
Array:
attention on both the start and end;
12.
Queue: LinkedList
13.
BFS,DFS: Start nodes could be many.
14.
Arrays.copyOfRange(int[], start, end(exclusive)) === substr
15.
binary search: left(inclusive) right(inclusive) judge left<=right at fist.
16.
number to string: zero ahead
17.
Take a string a time. Important: cache.
18.
Don't forget p = p.next when traverse a linked list.
19.
array list add at position i : add(i,object)
20.
pay attention: -2147483648
21.
rotated: equal….
22.
search insert: first and last;