All Projects β†’ joney000 β†’ Java Competitive Programming

joney000 / Java Competitive Programming

Licence: gpl-3.0
I have written some important Algorithms and Data Structures in an efficient way in Java with proper references to time and space complexity. These Pre-cooked and well-tested codes help to implement larger hackathon problems in lesser time. DFS, BFS, LCA, All Pair Shortest Path, Longest Common Subsequence, Binary Search, Lower Bound Search, Maximal Matching, Matrix Exponentiation, Segment Tree, Sparse Table, Merge Sort, Miller Prime Test, Prims - Minimum Spanning Tree, BIT - Binary Index Tree, Two Pointers, BST - Binary Search Tree, Maximum Subarray Sum, Immutable Data Structures, Persistent Data Structurs - Persistent Trie, Dijkstra, Z - Function, Minimum Cost Maximal Matching, Heavy Light Decomposition, Knapsack, Suffix Array and LCP - Longest Common Prefix, Squre Root Decomposition, Kth Order Statics, Trie / Prefix Tree, LIS - Longest Increasing Subsequence, Hashing

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Java Competitive Programming

C Sharp Algorithms
πŸ“š πŸ“ˆ Plug-and-play class-library project of standard Data Structures and Algorithms in C#
Stars: ✭ 4,684 (+19416.67%)
Mutual labels:  algorithms, graph-algorithms, hashing
Competitive coding
This repository contains some useful codes, techniques, algorithms and problem solutions helpful in Competitive Coding.
Stars: ✭ 393 (+1537.5%)
Mutual labels:  competitive-programming, algorithms, graph-algorithms
Competitive Programming
Repository of all my submissions to some competitive programming website (Online Judges), as well as, the implementation of some data structures and algorithms.
Stars: ✭ 53 (+120.83%)
Mutual labels:  competitive-programming, algorithms, graph-algorithms
Competitive Programming Repository
Competitive Programming templates that I used during the past few years.
Stars: ✭ 367 (+1429.17%)
Mutual labels:  competitive-programming, algorithms, hashing
Data structure and algorithms library
A collection of classical algorithms and data-structures implementation in C++ for coding interview and competitive programming
Stars: ✭ 133 (+454.17%)
Mutual labels:  competitive-programming, algorithms, graph-algorithms
450 Dsa
450-DSA helps you track your progress in solving 400+ DSA questions and keeps you engaging based on DSA-Cracker Sheet ⚑
Stars: ✭ 301 (+1154.17%)
Mutual labels:  competitive-programming, algorithms
Algods
Implementation of Algorithms and Data Structures, Problems and Solutions
Stars: ✭ 3,295 (+13629.17%)
Mutual labels:  algorithms, graph-algorithms
Algowiki
A wiki dedicated to competitive programming
Stars: ✭ 317 (+1220.83%)
Mutual labels:  competitive-programming, algorithms
TeamReference
Team reference for Competitive Programming. Algorithms implementations very used in the ACM-ICPC contests. Latex template to build your own team reference.
Stars: ✭ 29 (+20.83%)
Mutual labels:  graph-algorithms, competitive-programming
Algorithms
Minimal examples of data structures and algorithms in Python
Stars: ✭ 20,123 (+83745.83%)
Mutual labels:  competitive-programming, algorithms
Pyrival
⚑ Competitive Programming Library
Stars: ✭ 463 (+1829.17%)
Mutual labels:  competitive-programming, algorithms
Algorithms
My Algorithms and Data Structures studies. https://leandrotk.github.io/series/algorithms-problem-solving
Stars: ✭ 275 (+1045.83%)
Mutual labels:  competitive-programming, algorithms
Hackerrank Solutions
HackerRank concepts & solutions
Stars: ✭ 267 (+1012.5%)
Mutual labels:  competitive-programming, algorithms
Leetcode
Leetcode solutions
Stars: ✭ 2,894 (+11958.33%)
Mutual labels:  competitive-programming, algorithms
Competitive Programming
πŸ“Œ πŸ“š Solution of competitive programming problems, code templates, Data Structures and Algorithms, hackathons, interviews and much more.
Stars: ✭ 496 (+1966.67%)
Mutual labels:  competitive-programming, algorithms
T 414 Aflv
T-414-ÁFLV: A Competitive Programming Course
Stars: ✭ 488 (+1933.33%)
Mutual labels:  competitive-programming, algorithms
Online Judge Solutions
Solutions to ACM ICPC - style problems
Stars: ✭ 529 (+2104.17%)
Mutual labels:  competitive-programming, algorithms
Get better at cp in 2 months
This contains the curriculum that I will follow to get better at Competitive Programming in 2 months.
Stars: ✭ 627 (+2512.5%)
Mutual labels:  competitive-programming, algorithms
How To Prepare For Google Interview Swe Sre
This repository includes resources which are more than sufficient to prepare for google interview if you are applying for a software engineer position or a site reliability engineer position
Stars: ✭ 251 (+945.83%)
Mutual labels:  competitive-programming, algorithms
InterviewPrep
A repository containing link of good interview questions
Stars: ✭ 54 (+125%)
Mutual labels:  graph-algorithms, competitive-programming

Java-Competitive-Programming

In This Repository, I have written some of the important Algorithms and Data Structures efficiently in Java with proper references to time and space complexity. These Pre-cooked and well-tested codes helps to implement larger hackathon problems in lesser time.

Algorithms:

Algorithm Big-O Time, Big-O Space Comments/Symbols
DFS - 2-D Grid O(M * N), O(M * N) M * N = dimensions of matrix
DFS - Adjency List O(V + E), O(V + E) V = No of vertices in Graph, E = No of edges in Graph
BFS - 2-D Grid O(M * N), O(M * N) M * N = dimensions of matrix
BFS - Adjency List O(V + E), O(V + E) V = No of vertices in Graph, E = No of edges in Graph
LCA - Lowest Common Ancestor O(V), O(V)
LCA - Using Seg Tree O(log V), O(V + E) Using Euler tour and Segment Tree, preprocessing/building tree = O(N) & Each Query = O(log N)
All Pair Shortest Path O(V^3), O(V + E) Floyd Warshall algorithm
Longest Common Subsequence O(M * N), O(M * N) Finding LCS of N & M length string using Dynamic Programming
Binary Search O(log(N), O(N) Search in N size sorted array
Lower Bound Search O(log(N), O(1) Unlike C, Java Doesn't Provide Lower Bound, Upper Bound for already sorted elements in the Collections
Upper Bound Search O(log(N), O(1)
Maximal Matching O(√V x E), O(V + E) Maximum matching for bipartite graph using Hopcroft-Karp algorithm
Minimum Cost Maximal Matching - Hungarian algorithm O(N^3), O(N^2)
Matrix Exponentiation O(N^3 * log(X)) ,O(M * N) Exponentiation by squaring / divide and conquer MATRIX[N, N] ^ X
Segment Tree O(Q * log(N)), O(N) Q = no of queries , N = no of nodes , per query time = O(log N)
Segment Tree Lazy Propagation O(Q * log(N)), O(N) Q = no of queries , N = no of nodes , tree construction time = O(N), per query time = O(log N), range update time: O(log N)
Sparse Table O(Q * O(1) + N * log(N)), O(N * log(N)) per query time = O(1) and precompute time and space: O(N * log(N))
Merge Sort O(N * log(N)), O(N) divide and conquer algorithm
Miller Prime Test soft-O notation Γ•((log n)^4) with constant space
Kruskal- Minimum Spanning Tree O(E log V) , O(V + E)
BIT - Binary Index Tree / Fenwick Tree O(log N), O(N) per query time: O(log(N))
Two Pointers O(N), O(N) two directional scan on sorted array
Binary Search Tree - BST O(N), O(N)
Maximum Subarray Sum O(N), O(N) Kadane's algorithm
Immutable Data Structures, Persistent Data Structurs - Persistent Trie O(N * log N), O(N) query & update time: O(log N). It's frequently used where you have to maintain multiple version of your data structure typically in lograthimic time.
Dijkstra O((E+v) log V)), O(V + E)
Z - Function O(P + T), O(P + T) Leaner time string matching / occurrence finding of pattern string P into Large Text string T.
Heavy Light Decomposition O(N * log^2 N), O(N) per query time = (log N)^2
Interval Merge O(log N), O(N)
Knapsack O(N * S), (N * S) N = elements, S = MAX_Sum
Suffix Array and LCP - Longest Common Prefix O(N * log(N)), O(N)
Squre Root Decomposition O(N * √N), O(N) the range of N number can be divided in √N blocks
Kth Order Statics O(N), O(N) K’th Smallest/Largest Element in Unsorted Array
Trie / Prefix Tree O(N * L), O(N * L) if there are N strings of L size, per query time(Prefix information) = O(L)
LIS - Longest Increasing Subsequence O(N * log(N)), O(N)

Contributions

Want to contribute in corrections or enhancement? Great! Please raise a PR, or drop a mail at [email protected] .

I also highly recommed to read Introduction to Algorithms(CLRS book) and other authors implementations, it will give you diverse set of ideas to solve same algorithmic challenges.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].