java-solutions
java-solutions copied to clipboard
Solutions in JAVA for some coding platforms.
Follow me on your favorite platform for latest updates on my video channel
| Youtube | Tumblr | RSS |
|---|
You can also subscribe via email.
- How to use this repo
- Install softwares
- Setup Project
- CONTRIBUTE
- Solutions for some coding platforms
- Full list of questions
- Code Explanations
- String
- Array
- Linked Lists
- Trees
- Theory
- Algorithmic Paradigms
- Analysis of Algorithms
- Sorting Techniques
- Searching Techniques
- Data Structures
- Playlists
How to use this repo
Install softwares
- Install OpenJDK
- Install Maven
- Install Git
- Use your favorite editor. (I prefer IntelliJ. It is fast and free)
Setup Project
- Goto your desired folder and clone the repository
cdinto your directory- Build the project using
mvn clean install. - Startup IntelliJ and choose to import this project from your Explorer/Finder window.
- Start making changes/using it.
[user@machine ~] git clone https://github.com/nikoo28/java-solutions.git
[user@machine ~] cd java-solutions
[user@machine ~/java-solutions] mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ----------< com.studyalgorithms.javasolutions:java-solutions >----------
[INFO] Building java-solutions 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
... snipped
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.790 s
[INFO] Finished at: 2020-07-06T18:37:35-07:00
[INFO] ------------------------------------------------------------------------
[user@machine ~/java-solutions]
Contribute
Please contribute to this repository to help it make better. Any change like new questions you want to see, code improvements, doc improvements etc. is very welcome. Just send me a pull request and I will review the request and approve it, if it looks good.
Solutions for some coding platforms
- LeetCode
- HackerRank
- Codility
Full list of questions
https://studyalgorithms.com/site-map/
Code Explanations
String
- Longest palindromic substring
- First unique character in a string
- Valid anagram strings
- HackerRank: Two Characters
- HackerRank: Two Strings
- HackerRank: Sherlock and the valid string
- LeetCode (#49): Group Anagrams
Array
- Single non-repeating number
- Maximum sum contiguous sub-array
- HackerRank: Left Rotation
- HackerRank: Equal Stacks
- HackerRank: Missing Numbers
- HackerRank: Pairs
- HackerRank: Between Two Sets
- HackerRank: Queue Using Two Stacks
- LeetCode (#1): Two Sum
- LeetCode (#33): Search in a Rotated Sorted Array
- HackerRank: Birthday Cake Candles
- LeetCode (#442): Find all Duplicates in an Array
Linked Lists
Trees
Theory
Algorithmic Paradigms
- Algorithmic Paradigms: Brute Force
- Algorithmic Paradigms: Divide and Conquer
- Algorithmic Paradigms: Greedy
- Algorithmic Paradigms: Dynamic Programming
- Algorithmic Paradigms: Recursion
Analysis of Algorithms
- What is the Time Complexity of an Algorithm?
- How do you compare 2 Algorithms?
- What is the Big O notation?
- What is the Rate of Growth of an Algorithm?
Sorting Techniques
- Insertion Sort
- Bubble Sort
- Selection Sort
- Merge Sort
- Quick Sort
- Counting Sort
- Bucket Sort
- Radix Sort