/code-problems

Common code (problems from Leetcode, HackerEarth, HackerRank, CodeWars, Geeksforgeeks) and various companies hiring challenges solved in Java language

Primary LanguageJavaApache License 2.0Apache-2.0

Code Problems

Common code (problems from Leetcode, HackerEarth, HackerRank, CodeWars, Geeksforgeeks) and various companies hiring challenges solved in Java language

This is my repo full of code problems that I'm currently practicing prior to or during an interview, as well as general problem snippets. I hope that all these problems (and solutions) are useful to others for practice and review. Feel free to contribute any solutions and optimisations, and add your own problems that you find as well, as I would love to see them.

Problems

Algorithms

S.No. Solution
1 MO's Algorithm
2 Z Algorithm
3 Reversal Algorithm
4 Juggling Algorithm
5 Euclidean Algorithm
6 One Pass Hash Table
7 Two Pointer Technique - 1, Two Pointer Technique - 2
8 Boyer Moore Vooting Algorithm
9 Naive Pattern Search Algorithm
10 Optimized Naive Pattern Search Algorithm
11 Rabin Karp Pattern Search Algorithm
12 Counting Sort Algorithm
13 Floyd Cycle-Finding Algorithm
14 Brian Kernighan’s Algorithm

Data Structures

Topic Name Number of Problems Solved
Arrays 16
Bit Manipulation 23
Strings 6
Math 4
Trie 0
Hashing 6
Recursion 1
Stack 2

Different Coding Sites

Website Number of Problems Solved
Codewars 41
Hackerearth 19
Hackerrank 1
Leetcode 16
Leetcode Top Interview Questions 3

Company Hiring Challenges

S.No. Company Solution
1 Cure Skin Speical Array Operation
2 Fidelity International Animal Inheritance , Custom Sort , Distance Between Two points
3 NearBuy Count Duplicates , Maximum Difference , Username Disparity , Username Disparity Simple Version
4 NinjaCart Buying Stock
5 Samsung R & D Odd Sum Problem , Odd Sum Problem Simple Version
6 ThoughtWorks Compare Strings , Digits in Integer , Intelligent Girl , Track with the Cards
7 Trusting Social Bugs , Determine a winner
8 HSBC Help John, Sam Height

Contributing

If you have a problem or solution that's not currently not included, please open an issue or pull request! If you're including new content, please make sure you have permission to publish the content you are adding. Under no circumstance should you copy problems online without a visible license or attributions.