JAVA
Coding
Interview
Questions
With Solution
</>……………………….</>
1 of 288
246
,Contents
1 Rotate Array in Java 13
2 Evaluate Reverse Polish Notation 17
3 Isomorphic Strings 21
4 Word Ladder 23
5 Word Ladder II 25
6 Median of Two Sorted Arrays 29
7 Kth Largest Element in an Array 31
8 Wildcard Matching 33
9 Regular Expression Matching in Java 35
10 Merge Intervals 39
11 Insert Interval 41
12 Two Sum 43
13 Two Sum II Input array is sorted 45
14 Two Sum III Data structure design 47
15 3Sum 49
16 4Sum 53
17 3Sum Closest 55
18 String to Integer (atoi) 57
19 Merge Sorted Array 59
20 Valid Parentheses 61
2 | 531
2 of 288
246
, Contents
21 Longest Valid Parentheses 63
22 Implement strStr() 65
23 Minimum Size Subarray Sum 69
24 Search Insert Position 73
25 Longest Consecutive Sequence 75
26 Valid Palindrome 77
27 ZigZag Conversion 81
28 Add Binary 83
29 Length of Last Word 85
30 Triangle 87
31 Contains Duplicate 89
32 Contains Duplicate II 91
33 Contains Duplicate III 93
34 Remove Duplicates from Sorted Array 95
35 Remove Duplicates from Sorted Array II 99
36 Longest Substring Without Repeating Characters 103
37 Longest Substring Which Contains 2 Unique Characters 105
38 Substring with Concatenation of All Words 109
39 Minimum Window Substring 111
40 Reverse Words in a String 113
41 Find Minimum in Rotated Sorted Array 115
42 Find Minimum in Rotated Sorted Array II 117
43 Search in Rotated Sorted Array 119
44 Search in Rotated Sorted Array II 121
20 Valid Parentheses 61
2 | 531
2
3 of 288
246
, Contents
46 Majority Element 125
47 Majority Element II 127
48 Remove Element 129
49 Largest Rectangle in Histogram 131
50 Longest Common Prefix 133
51 Largest Number 135
52 Simplify Path 137
53 Compare Version Numbers 139
54 Gas Station 141
55 Pascal’s Triangle 143
56 Pascal’s Triangle II 145
57 Container With Most Water 147
58 Candy 149
59 Trapping Rain Water 151
60 Count and Say 153
61 Search for a Range 155
62 Basic Calculator 157
63 Group Anagrams 159
64 Shortest Palindrome 161
65 Rectangle Area 163
66 Summary Ranges 165
67 Increasing Triplet Subsequence 167
68 Get Target Number Using Number List and Arithmetic Operations 169
69 Reverse Vowels of a String 171
20 Valid Parentheses 61
2 | 531
2
4 of 288
246