Skip to content

touir1/ProblemSolving

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProblemSolving

A repository documenting my daily problem solving to prepare for Google interviews 😅

Many of the problems solved are just done as a daily practice. But for UVa problems, they are listed in a book called Competitive Programming 3 by Steven & Felix Halim and i'm solving them while reading the book.

I'm also writing a documentation for the different algorithms and datastructures used: Documentation link.

Solved problems from Google Kick Start :

Problem name Solutions Year Round
Transform The String Java 2021 H
Centauri Prime Java 2022 session 1
Sample Problem Java 2022 session 1

Solved problems from UVa Online Judge :

Problem name Solutions Tags Book section
146 - ID Codes Java Next permutation, Reverse, Swap, Array 2.2. Linear DS with Built-in Libraries
272. TEX Quotes Java Ad hoc, String 1.3.3 Time to Start the Journey
230 - Borrowers Java HashMap, ArrayList, Sort 2.2. Linear DS with Built-in Libraries
278 - Chess Java Ad hoc, Chess 1.4 The Ad Hoc Problems
462 - Bridge Hand Evaluator Java Ad hoc, Simulation, Cards 1.4 The Ad Hoc Problems
489 - Hangman Judge Java Ad hoc, Games 1.4 The Ad Hoc Problems
573 - The Snail Java Ad hoc 1.3.3 Time to Start the Journey
665 - False coin Java Array 2.2. Linear DS with Built-in Libraries
696 - How Many Knights Java Ad hoc, Chess 1.4 The Ad Hoc Problems
732 - Anagrams by Stack Java Stack, LinkedList, Backtracking, Recursive 2.2. Linear DS with Built-in Libraries
790 - Head Judge Headache Java Sort, Array 2.2. Linear DS with Built-in Libraries
939 - Genes Java BST, TreeMap 2.3 Non-Linear DS with Built-in Libraries
1124 - Celebrity jeopardy Java Ad hoc 1.3.3 Time to Start the Journey
10038 - Jolly Jumpers Java Array 2.2. Linear DS with Built-in Libraries
10107 - What is the Median? Java Array, Median, QuickSelect 2.2. Linear DS with Built-in Libraries
10114 - Loansome Car Buyer Java Ad hoc, Simulation 1.3.3 Time to Start the Journey
10141 - Request for Proposal Java Ad hoc 1.3.3 Time to Start the Journey
10189 - Minesweeper Java Ad hoc, Games 1.4 The Ad Hoc Problems
10258 - Contest Scoreboard Java List, Sort 2.2. Linear DS with Built-in Libraries
10264 - The Most Potent Corner Java Bitmask 2.2. Linear DS with Built-in Libraries
10284 - Chessboard in FEN Java Ad hoc, Chess 1.4 The Ad Hoc Problems
10550 - Combination Lock Java Ad hoc, Simulation 1.3.3 Time to Start the Journey
10646 - What is the Card? Java Ad hoc, Cards 1.4 The Ad Hoc Problems
10855 - Rotated square Java Matrix, Rotation 2.2. Linear DS with Built-in Libraries
10920 - Spiral Tap Java Simulation, Matrix 2.2. Linear DS with Built-in Libraries
11044 - Searching for Nessy Java Ad hoc, Math 1.3.3 Time to Start the Journey
11093 - Just Finish it up Java Array 2.2. Linear DS with Built-in Libraries
11172 - Relational Operator Java Ad hoc, Comparison 1.3.3 Time to Start the Journey
11173 - Grey Codes Java Bitmask 2.2. Linear DS with Built-in Libraries
11340 - Newspaper Java Array, Hashing, Large input 2.2. Linear DS with Built-in Libraries
11364 - Parking Java Ad hoc, Math 1.3.3 Time to Start the Journey
11498 - Division of Nlogonia Java Ad hoc, Coordinates 1.3.3 Time to Start the Journey
11507 - Bender B. Rodriguez Problem Java Ad hoc 1.3.3 Time to Start the Journey
11547 - Automatic Answer Java Ad hoc, Math 1.3.3 Time to Start the Journey
11559 - Event Planning Java Ad hoc, Simulation 1.3.3 Time to Start the Journey
11581 - Grid Successors Java Matrix, Graph 2.2. Linear DS with Built-in Libraries
11727 - Cost Cutting Java Ad hoc, Sort 1.3.3 Time to Start the Journey
11799 - Horror Dash Java Ad hoc 1.3.3 Time to Start the Journey
11926 - Multitasking Java BitSet 2.2. Linear DS with Built-in Libraries
11933 - Splitting Numbers Java Bitmask, Least significant bit 2.2. Linear DS with Built-in Libraries
11988 - Broken Keyboard (a.k.a. Beiju Text) Java LinkedList 2.2. Linear DS with Built-in Libraries
12150 - Pole Position Java Array 2.2. Linear DS with Built-in Libraries
12187 - Brothers Java Matrix 2.2. Linear DS with Built-in Libraries
12207 - That is Your Queue Java Queue, Deque 2.2. Linear DS with Built-in Libraries
12247 - Jollo Java Ad hoc, Cards 1.4 The Ad Hoc Problems
12250 - Language Detection Java Ad hoc 1.3.3 Time to Start the Journey
12279 - Emoogle Balance Java Ad hoc 1.3.3 Time to Start the Journey
12289 - One-Two-Three Java Ad hoc 1.3.3 Time to Start the Journey
12291 - Polyomino Composer Java Matrix 2.2. Linear DS with Built-in Libraries
12356 - Army Buddies Java Array, Buffers, Linked list 2.2. Linear DS with Built-in Libraries
12372 - Packing for Holiday Java Ad hoc 1.3.3 Time to Start the Journey
12398 - NumPuzz I Java Matrix 2.2. Linear DS with Built-in Libraries
12541 - Birthdates Java Sort 2.2. Linear DS with Built-in Libraries

Solved problems from leetcode.com :

Problem name Solutions Tags
1. Two Sum Java Array, Hash Table
2. Add Two Numbers Java Linked List, Math, Recursion
3. Longest Substring Without Repeating Characters Java Hash Table, String, Sliding Window
4. Median of Two Sorted Arrays Java Array, Binary Search Divide and Conquer
5. Longest Palindromic Substring Java String, Dynamic Programming
6. Zigzag Conversion Java String
7. Reverse Integer Java Math
8. String to Integer (atoi) Java String
9. Palindrome Number Java Math
10. Regular Expression Matching Java String, Dynamic Programming, Recursion
13. Roman to Integer Java Hash Table, Math, String
14. Longest Common Prefix Java String
20. Valid Parentheses Java String, Stack
21. Merge Two Sorted Lists Java Linked List, Recursion
23. Merge k Sorted Lists Java Linked List, Divide And Conquer
24. Swap Nodes in Pairs Java Linked List, Recursion
39. Combination Sum Java Array, Backtracking
61. Rotate List Java Linked List, Two Pointers
71. Simplify Path Java String, Stack
78. Subsets Java Array, Backtracking, Bit Manipulation
80. Remove Duplicates from Sorted Array II Java Array, Two Pointers
82. Remove Duplicates from Sorted List II Java Linked List, Two Pointers
84. Largest Rectangle in Histogram Java Array, Stack, Monotonic Stack
104. Maximum Depth of Binary Tree Java Tree, Depth-First Search
121. Best Time to Buy and Sell Stock Java Array, Dynamic Programming
127. Word Ladder Java Hash Table, String, Breadth-First Search
133. Clone Graph Java Hash Table, Depth-First Search, Graph, Breadth-First Search
134. Gas Station Java Array, Greedy
136. Single Number Java Array, Bit Manipulation
138. Copy List with Random Pointer Java Hash Table, Linked List
141. Linked List Cycle Java Hash Table, Linked List, Two Pointers
148. Sort List Java Linked List, Two Pointers, Sorting, Divide And Conquer, Merge Sort
165. Compare Version Numbers Java String, Two Pointers
169. Majority Element Java Array, Hash Table, Divide And Conquer, Sorting, Counting
171. Excel Sheet Column Number Java String, Math
189. Rotate Array Java Array, Math, Two Pointers
211. Design Add and Search Words Data Structure Java String, Depth-First Search, Design, Tree
228. Summary Ranges Java Array
258. Add Digits Java Math, Simulation, Number Theory
316. Remove Duplicate Letters Java String, Stack, Greedy, Monotonic Stack
338. Counting Bits Java Dynamic Programming, Bit Manipulation
389. Find the Difference Java Hash Table, String, Bit Manipulation
392. Is Subsequence Java Two Pointers, String, Dynamic Programming
402. Remove K Digits Java String, Stack, Greedy, Monotonic Stack
413. Arithmetic Slices Java Array, Dynamic Programming
421. Maximum XOR of Two Numbers in an Array Java Array, Hash Table, Bit Manipulation, Binary Tree
438. Find All Anagrams in a String Java Hash Table, String, Sliding Window
454. 4Sum II Java Hash Table, Arrays
520. Detect Capital Java String
525. Contiguous Array Java Array, Hash Table, Prefix Sum
532. K-diff Pairs in an Array Java Array, Hash Table, Two Pointers
560. Subarray Sum Equals K Java Array, Hash Table, Prefix Sum
567. Permutation in String Java Hash Table, Two Pointers, String
662. Maximum Width of Binary Tree Java Tree, Depth-First Search, Breadth-First Search, Binary Tree
740. Delete and Earn Java Array, Hash Table, Dynamic Programming
799. Champagne Tower Java Dynamic Programming
847. Shortest Path Visiting All Nodes Java Dynamic Programming, Bit Manipulation, Breadth-First Search, Graph, Bitmask
856. Score of Parentheses Java String, Stack
895. Maximum Frequency Stack Java Hash Table, Stack, Design, Ordered Set
941. Valid Mountain Array Java Array
946. Validate Stack Sequences Java Array, Stack, Simulation
1249. Minimum Remove to Make Valid Parentheses Java String, Stack
1288. Remove Covered Intervals Java Array, Sorting
1291. Sequential Digits Java Enumeration
1305. All Elements in Two Binary Search Trees Java Binary Search Tree, Depth-First Search, Inorder Traversal
1359. Count All Valid Pickup and Delivery Options Java Dynamic Programming, Math, Combinatorics
1510. Stone Game IV Java Math, Dynamic Programming, Game Theory
1672. Richest Customer Wealth Java Array, Matrix
1675. Minimize Deviation in Array Java Array, Greedy, Heap, Priority Queue

About

Algorithmic and data structure documentation & Solutions for coding problems as preparation for google interviews

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published