Solutions to problems on algorithms from UVa Online Judge(ACM-ICPC Live Archive), hackerrank, Leetcode.com
Using: Arrays, Hash Table, LinkedList, Binary Search, Dynamic Programming, Stack , Heap, reedy, Sort, Tree DFS, BFS, Graph, Binary Search Tree, Recursion, Memoization, Queue ,Map, etc.
My current statistic
# | problems | Solutions | From | Tags, Notes |
---|---|---|---|---|
1 | Google is Feeling Lucky | Java | Uva-ACM-ICPC | Array |
2 | Zeros and Ones | Java | Uva-ACM-ICPC | String |
3 | What is the Median? | Java | Uva-ACM-ICPC | ArrayList |
4 | P12578 | Java | Uva-ACM-ICPC | Math |
5 | A Special "Happy Birthday" Song!!! | Java | Uva-ACM-ICPC | Array |
6 | Robot Instructions | Java | Uva-ACM-ICPC | Array |
7 | Save Setu | Java | Uva-ACM-ICPC | |
8 | Emoogle Balance | Java | Uva-ACM-ICPC | |
9 | Tariff Plan | Java | Uva-ACM-ICPC | |
10 | Schedule of a Married Man | Java | Uva-ACM-ICPC | |
11 | Brainfuck | Java | Uva-ACM-ICPC | |
12 | Egypt | Java | Uva-ACM-ICPC | |
13 | Bafana Bafana | Java | Uva-ACM-ICPC | |
14 | Jumping Mario | Java | Uva-ACM-ICPC | |
15 | Cost Cutting | Java | Uva-ACM-ICPC | |
16 | Laser Sculpture | Java | Uva-ACM-ICPC | |
17 | Sub-prime | Java | Uva-ACM-ICPC | |
18 | Burger Time? | Java | Uva-ACM-ICPC | |
19 | Hello World! | Java | Uva-ACM-ICPC | |
20 | Train Tracks | Java | Uva-ACM-ICPC | |
21 | Automatic Answer | Java | Uva-ACM-ICPC | |
22 | SMS Typing | Java | Uva-ACM-ICPC | |
23 | Division of Nlogonia | Java | Uva-ACM-ICPC | |
24 | Square Numbers | Java | Uva-ACM-ICPC | |
25 | GCD | Java | Uva-ACM-ICPC | |
26 | Parking | Java | Uva-ACM-ICPC | |
27 | Summing Digits | Java | Uva-ACM-ICPC | |
28 | Ternary | Java | Uva-ACM-ICPC | |
29 | Searching for Nessy | Java | Uva-ACM-ICPC | |
30 | Big Chocolate | Java | Uva-ACM-ICPC | |
31 | The Swallowing Ground | Java | Uva-ACM-ICPC | |
32 | Prerequisites? | Java | Uva-ACM-ICPC | |
33 | Beat the Spread! | Java | Uva-ACM-ICPC | |
34 | Combination Lock | Java | Uva-ACM-ICPC | |
35 | Love Calculator | Java | Uva-ACM-ICPC | |
36 | Peter's Smokes | Java | Uva-ACM-ICPC | |
37 | Flip Sort | Java | Uva-ACM-ICPC | |
38 | rouble with a Pentagon | Java | Uva-ACM-ICPC | |
39 | Fourth Point !! | Java | Uva-ACM-ICPC | |
40 | Request for Proposal | Java | Uva-ACM-ICPC | |
41 | What is the Median? | Java | Uva-ACM-ICPC | |
42 | WERTYU | Java | Uva-ACM-ICPC | |
43 | Primary Arithmetic | Java | Uva-ACM-ICPC | |
44 | Reverse and Add | Java | Uva-ACM-ICPC | |
45 | Digit Counting | Java | Uva-ACM-ICPC | |
46 | Blowing Fuses | Java | Uva-ACM-ICPC | |
47 | Secret Research | Java | Uva-ACM-ICPC | |
48 | Box of Bricks | Java | Uva-ACM-ICPC | |
49 | Clock Hands | Java | Uva-ACM-ICPC | |
50 | The Snail | Java | Uva-ACM-ICPC | |
51 | Train Swapping | Java | Uva-ACM-ICPC | |
52 | TEX Quotes | Java | Uva-ACM-ICPC | |
53 | Power of Cryptography | Java | Uva-ACM-ICPC | |
54 | The 3n + 1 problem | Java | Uva-ACM-ICPC | |
55 | Between Two Sets | Java | Hackerrank.com | |
56 | Divisible Sum Pairs | Java | Hackerrank.com | |
57 | Designer PDF Viewer | Java | Hackerrank.com | |
58 | Sock Merchant | Java | Hackerrank.com | |
59 | Utopian Tree | Java | Hackerrank.com | |
60 | Twins | Java | Hackerrank.com | |
61 | Add Two Numbers | Java | LeetCode Online Judge | |
62 | Longest Substring Without Repeating Characters | Java | LeetCode Online Judge | |
63 | ZigZag Conversion | Java | LeetCode Online Judge | |
64 | Reverse Integer | Java | LeetCode Online Judge | |
65 | String to Integer (atoi) | Java | LeetCode Online Judge | |
66 | Palindrome Number | Java | LeetCode Online Judge | |
67 | Longest Palindromic Substring | Java | LeetCode Online Judge | |
68 | Roman to Integer | Java | LeetCode Online Judge | |
69 | Longest Common Prefix | Java | LeetCode Online Judge | |
70 | Word Ladder | Java | LeetCode Online Judge | Queue, BFS |
71 | Valid Parentheses | Java | LeetCode Online Judge | Stack |
72 | Merge Two Sorted Lists | Java | LeetCode Online Judge | LinkedList |
73 | Container With Most Water | Java | LeetCode Online Judge | Array, Math |
74 | Remove Duplicates from Sorted Array | Java | LeetCode Online Judge | |
75 | Remove Element | Java | LeetCode Online Judge | Array |
76 | Same Tree | Java | LeetCode Online Judge | Tree |
77 | Symmetric Tree | Java | LeetCode Online Judge | Tree |
78 | 3Sum Closest | Java | LeetCode Online Judge | Arrays, Math |
79 | Sort Characters By Frequency | Java | LeetCode Online Judge | |
80 | Kill Process | Java | LeetCode Online Judge | |
81 | Isomorphic Strings | Java | LeetCode Online Judge | |
82 | Intersection of Two Arrays | Java | LeetCode Online Judge | |
83 | Palindrome Linked List | Java | LeetCode Online Judge | |
84 | Minimum Absolute Difference in BST | Java | LeetCode Online Judge | |
85 | Min Stack | Java | LeetCode Online Judge | |
86 | Implement Stack using Queues | Java | LeetCode Online Judge | |
87 | Search Insert Position | Java | LeetCode Online Judge | |
88 | Sum of Left Leaves | Java | LeetCode Online Judge | |
89 | Maximum Depth of Binary Tree | Java | LeetCode Online Judge | |
90 | Next Greater Element I | Java | LeetCode Online Judge | |
91 | Implement Queue using Stacks | Java | LeetCode Online Judge | |
92 | Rotate Array | Java | LeetCode Online Judge | |
93 | Rotate Array | Java | LeetCode Online Judge | |
94 | Best Time to Buy and Sell Stock | Java | LeetCode Online Judge | Dynamic P. |
95 | Simplify Path | Java | LeetCode Online Judge | |
96 | Evaluate Reverse Polish Notation | Java | LeetCode Online Judge | |
97 | Contains Duplicate | Java | LeetCode Online Judge | |
98 | Decode String | Java | LeetCode Online Judge | |
99 | Search a 2D Matrix | Java | LeetCode Online Judge | |
100 | Range Sum Query 2D - Immutable | Java | LeetCode Online Judge | Dynamic P. |
101 | Valid Anagram | Java | LeetCode Online Judge | |
102 | Longest Word in Dictionary through Deleting | Java | LeetCode Online Judge | |
103 | Sort List | Java | LeetCode Online Judge | |
104 | Sort Colors | Java | LeetCode Online Judge | |
105 | Maximum Subarray | Java | LeetCode Online Judge | Dynamic P. |
106 | Range Sum Query - Immutable | Java | LeetCode Online Judge | Dynamic P. |
107 | House Robber | Java | LeetCode Online Judge | Dynamic P. |
108 | Single Number | Java | LeetCode Online Judge | |
109 | Happy Number | Java | LeetCode Online Judge | |
110 | Count Primes | Java | LeetCode Online Judge | |
111 | Word Pattern | Java | LeetCode Online Judge | Hash Table |
112 | Keyboard Row | Java | LeetCode Online Judge | HashTable |
113 | Longest Harmonious Subsequence | Java | LeetCode Online Judge | HashMap |
114 | Binary Tree Inorder Traversal | Java | LeetCode Online Judge | Tree |
115 | Clone Graph | Java | LeetCode Online Judge | Graph,BFS |
116 | Merge Two Binary Trees | Java | LeetCode Online Judge | Tree |
117 | Subtree of Another Tree | Java | LeetCode Online Judge | Tree |
118 | Binary Tree Tilt | Java | LeetCode Online Judge | Tree |
119 | Diameter of Binary Tree | Java | LeetCode Online Judge | Tree, DFS |
120 | Path Sum | Java | LeetCode Online Judge | Tree |
121 | Remove Duplicates from Sorted List | Java | LeetCode Online Judge | LinkedList |
122 | Rotate List | Java | LeetCode Online Judge | LinkedList |
123 | Reverse Linked List | Java | LeetCode Online Judge | |
124 | Guess Number Higher or Lower | Java | LeetCode Online Judge | BS |
125 | Two Sum II - Input array is sorted | Java | LeetCode Online Judge | BS |
126 | Beautiful Arrangement | Java | LeetCode Online Judge | Backtracking |
127 | Delete Operation for Two Strings | Java | LeetCode Online Judge | DP |
128 | Construct String from Binary Tree | Java | LeetCode Online Judge | Tree |
129 | Optimal Division | Java | LeetCode Online Judge | String |
130 | Count and Say | Java | LeetCode Online Judge | |
131 | Merge Sorted Array | Java | LeetCode Online Judge | |
132 | Permutations | Java | LeetCode Online Judge | Backtracking |
133 | Maximum Distance in Arrays | Java | LeetCode Online Judge | |
134 | Fizz Buzz | Java | LeetCode Online Judge | |
135 | Reverse String | Java | LeetCode Online Judge | |
136 | Move Zeroes | Java | LeetCode Online Judge | |
137 | Missing Number | Java | LeetCode Online Judge | |
138 | Repeated DNA Sequences | Java | LeetCode Online Judge | |
139 | Sum of Square Numbers | Java | LeetCode Online Judge | |
140 | Sum of Two Integers | Java | LeetCode Online Judge | Bit M. |
141 | Excel Sheet Column Number | Java | LeetCode Online Judge | |
142 | Array Partition I | Java | LeetCode Online Judge | MergeSort |
143 | Max Consecutive Ones | Java | LeetCode Online Judge | |
144 | Triangle | Java | LeetCode Online Judge | |
145 | Minimum Path Sum | Java | LeetCode Online Judge | |
146 | Summary Ranges | Java | LeetCode Online Judge | |
147 | Partition List | Java | LeetCode Online Judge | |
148 | Linked List Cycle | Java | LeetCode Online Judge | LinkedList |
149 | Reorder List | Java | LeetCode Online Judge | LinkedList |
150 | Balanced Binary Tree | Java | LeetCode Online Judge | Tree |
151 | Validate Binary Search Tree | Java | LeetCode Online Judge | Tree |
152 | Invert Binary Tree | Java | LeetCode Online Judge | |
153 | Binary Tree Paths | Java | LeetCode Online Judge | DFS |
154 | Find Mode in Binary Search Tree | Java | LeetCode Online Judge | |
155 | Path Sum III | Java | LeetCode Online Judge | Tree |
156 | Binary Tree Level Order Traversal | Java | LeetCode Online Judge | |
157 | Binary Tree Level Order Traversal II | Java | LeetCode Online Judge | |
158 | Average of Levels in Binary Tree | Java | LeetCode Online Judge | |
159 | Reverse Nodes in k-Group | Java | LeetCode Online Judge | Tree |
160 | Maximum Product Subarray | Java | LeetCode Online Judge | |
161 | Kth Largest Element in an Array | Java | LeetCode Online Judge | |
162 | Kth Smallest Element in a BST | Java | LeetCode Online Judge | |
163 | Rotate List | Java | LeetCode Online Judge | |
164 | Combinations | Java | LeetCode Online Judge | |
165 | Path Sum II | Java | LeetCode Online Judge | |
166 | Sum Root to Leaf Numbers | Java | LeetCode Online Judge | |
167 | Maximum Average Subarray I | Java | LeetCode Online Judge | |
168 | Combination Sum | Java | LeetCode Online Judge | |
169 | First Duplicate | Java | Codefights | |
170 | First Not Repeating Character | Java | Codefights | |
171 | Rotate Image | Java | Codefights | |
172 | Is CryptSolution | Java | Codefights | |
173 | Remove K From List | Java | Codefights | Linkedlist |
174 | Is List Palindrome | Java | Codefights | Linkedlist |
175 | Add Two Huge Numbers | Java | Codefights | Linkedlist |
176 | Merge Two LinkedLists | Java | Codefights | |
177 | Reverse Nodes In K Groups | Java | Codefights | |
178 | Rearrange Last N | Java | Codefights | |
179 | Grouping Dishes | Java | Codefights | HashTable |
180 | Are Following Patterns | Java | Codefights | HashTable |
181 | Contains Close Nums | Java | Codefights | HashTable |
182 | Has Path With Given Sum | Java | Codefights | Tree |
183 | Is Tree Symmetric | Java | Codefights | |
184 | Find Profession | Java | Codefights | |
185 | Kth Largest In BST | Java | Codefights | |
186 | Is Subtree | Java | Codefights | |
187 | TraverseTree | Java | Codefights | BFS |
188 | Largest Values In TreeRows | Java | Codefights | |
189 | Digit Tree Sum | Java | Codefights | DFS |
190 | Climbing Stairs | Java | Codefights | DP |
191 | House Robber | Java | Codefights | DP |
192 | Compose Ranges | Java | Codefights | DP |
193 | Map Decoding | Java | Codefights | |
194 | Climbing Stair case | Java | Codefights | |
195 | Contains Duplicates | Java | Codefights | |
196 | Sum Of Two | Java | Codefights | |
197 | Sum In Range | Java | Codefights | |
198 | Array Max Consecutive Sum2 | Java | Codefights | |
199 | Find Longest Subarray By Sum | Java | Codefights | |
200 | Product Except Self | Java | Codefights | |
201 | Judge Route Circle | Java | LeetCode Online Judge | |
202 | Find Anagram Mappings | Java | LeetCode Online Judge | |
203 | Jewels and Stones | Java | LeetCode Online Judge | |
204 | Self Dividing Numbers | Java | LeetCode Online Judge | |
205 | Baseball Game | Java | LeetCode Online Judge | |
206 | Toeplitz Matrix | Java | LeetCode Online Judge | |
207 | Distribute Candies | Java | LeetCode Online Judge | |
208 | Add Strings | Java | LeetCode Online Judge | |
209 | Relative Ranks | Java | LeetCode Online Judge | |
210 | Assign Cookies | Java | LeetCode Online Judge | |
211 | Student Attendance Record I | Java | LeetCode Online Judge | |
212 | Find the Difference | Java | LeetCode Online Judge | |
213 | Longest Palindrome | Java | LeetCode Online Judge | |
214 | Non-decreasing Array | Java | LeetCode Online Judge | |
215 | Count Binary Substrings | Java | LeetCode Online Judge | |
216 | Contains Duplicate II | Java | LeetCode Online Judge | |
217 | 2D Array - DS | Java | Hackerrank | |
218 | Arrays Left Rotation | Java | Hackerrank | |
219 | Hash Tables: Ransom Note | Java | Hackerrank | |
220 | New Year Chaos | Java | Hackerrank | |
221 | Minimum Swaps 2 | Java | Hackerrank | |
222 | Sherlock and Anagrams | Java | Hackerrank | |
223 | Count Triplets | Java | Hackerrank | |
224 | Frequency Queries | Java | Hackerrank | |
225 | Array Manipulation | Java | Hackerrank | |
226 | Making Anagrams | Java | Hackerrank | |
227 | Sherlock and the Valid String | Java | Hackerrank | |
228 | Special Palindrome Again | Java | Hackerrank | |
229 | Longest Word in Dictionary | Java | Leetcode | Trie |
230 | Implement Trie (Prefix Tree) | Java | Leetcode | Trie |
231 | Max Area of Island | Java | Leetcode | DFS |
232 | Java | Leetcode | ||
233 | Java | Leetcode | ||
234 | Java | Leetcode | ||
235 | Java | Leetcode | ||
236 | Java | Leetcode | ||
237 | Java | Leetcode |