Skip to content

My self made guide to competitive coding and interview skills

Notifications You must be signed in to change notification settings

A-Nikhil/Competitive-Coding-Practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Competitive Coding Practice

This repository contains code examples of my preparation for the Placements season.
I will be updating it continuously as I practice, so stay tuned.

Places where you can practice competitive coding

  1. For studying for an interview or an online assessment.
    1. GeeksForGeeks
      1. Algorithms
      2. Data Structures
      3. Programming Language (Java, in my case)
    2. Gate Smashers for OS / CN/ DBMS
  2. For practicing
    1. LeetCode
    2. HackerRank

Directory Tree for Reference

| Algorithms
----| Backtracking
--------| KnightTour.java
--------| PermutationsOfAString.java
--------| RatInAMaze.java
----| BitMagic
--------| GenerateBinaryNumbers.java
--------| MinimumFlipsTOMake_A_OR_B_to_C.java
----| Counting
--------| DistributeMAmongN.java
--------| DivideNInGroupsOfK.java
--------| NumberOfWaysToClimbStairs.java
--------| ReachAGivenScoreInMatrix.java
--------| WaysToGenerateSum.java
----| DivideAndConquer
--------| ArrayInversion.java
--------| XRaisedToN.java
----| DynamicProgramming
--------| BinaryStringWithoutConsecutiveOnes.java
--------| binomialCoeff.java
--------| BoxStackingProblem.java
--------| ChainProblem.java
--------| CuttingARod.java
--------| DecodeWays.java
--------| editDistance.java
--------| EggDropping.java
--------| Knapsack01.java
--------| LongestBitonicSubsequence.java
--------| longestCommonSubsequence.java
--------| LongestConsecutivePath.java
--------| LongestFibonacciLikeSequence.java
--------| longestIncreasingSubsequence.java
--------| LongestPalindromicString.java
--------| MatrixChainMultiplication.java
--------| MaximumProductSubarray.java
--------| MaxProfitByBuyingAndSellingShares.java
--------| MinCostToReachDestination.java
--------| MinimumCostPath.java
--------| MinimumTriangleSumFromTopToBottom.java
--------| MinJumpsTillEnd.java
--------| MinNumberOfSquaresForGivenSum.java
--------| NumberOfNonDecreasingNumbers.java
--------| PartitionProblem.java
--------| SameSumTwoHalvesSubstring.java
--------| UglyNumber.java
--------| UniquePaths.java
--------| WeightedJobScheduling.java
----| Greedy
--------| ActivitySelection.java
--------| JobSelectionMaxProfitDeadline.java
--------| MinFibonacciTillN.java
--------| NonOverlappingIntervals.java
----| Math
--------| DayOfTheWeek.java
--------| EventualSumOfDigits.java
--------| NumbersWithSameConsecutiveDifference.java
--------| OccurrencesOfN.java
--------| SieveOfErasothenes.java
----| Searching
--------| BinarySearch.java
--------| InterpolationSearch.java
--------| JumpSearch.java
--------| LinearSearch.java
--------| TernarySearch.java
----| Sorting
--------| BinarySearchInAlmostSortedArray.java
--------| BubbleSort.java
--------| ClosestPairSum.java
--------| CommonElementInSortedArrays.java
--------| CountingSort.java
--------| FindKClosestElements.java
--------| HeapSort.java
--------| InsertionSort.java
--------| IterativeQuickSort.java
--------| KthSmallest.java
--------| KthSmallestUsingHeap.java
--------| MergeSort.java
--------| MergeSortLinkedList.java
--------| MinLengthUnsortedArray.java
--------| QuickSort.java
--------| SelectionSort.java
--------| SortInWave.java
| Commons
----| ArrayPrinter.java
----| BinarySearchTree.java
----| GlobalVar.java
----| GraphList.java
----| GraphMatrix.java
----| LeetCodeListMaker.java
----| ListNode.java
----| ListNodeString.java
----| MatrixPrinter.java
----| Node.java
| CSCoreSubjects
| DataStructures
----| Arrays
--------| ContainerWithMostWater.java
--------| Matrices
------------| RotateImage.java
------------| SortingA2DArray.java
------------| SpiralOrderTraversal.java
------------| SurroundingRegions.java
------------| ValidSudoku.java
--------| MinSwaps
------------| SegregateOddEven.java
------------| SortAnArrayTillN_NaturalNumbers.java
------------| ToBringPairsTogether.java
------------| ToMakeAll1sTogether.java
------------| ToMakeEveryElementEqual.java
------------| ToMakeSumK.java
--------| Misc
------------| ArrayPairDivisibleByK.java
------------| AvoidFloods.java
------------| BeautifulArrangement2.java
------------| CombinationSum.java
------------| ContainerWithMostWater.java
------------| DifferenceArray.java
------------| DuplicatesInArray.java
------------| FirstMissingPositive.java
------------| HIndex.java
------------| LargestTime.java
------------| MagicTriplets.java
------------| MergeIntervals.java
------------| MinimumIncrementsToMakeArrayUnique.java
------------| MinimumSizeSumSubArray.java
------------| PascalTriangleAtK.java
------------| PeakElement.java
------------| PrefixSumCorporateBookings.java
------------| RangeSumOfSortedSubarrays.java
------------| SnapshotArray.java
------------| SubArraysWithBoundedMaximum.java
------------| Subsets1.java
------------| Subsets2.java
------------| SumOfNumbersAtPrimeIndices.java
------------| ThreeSum.java
------------| TopKFrequent.java
------------| TwoSum.java
--------| OrderStatistics
------------| ElementsWhichHaveAtleast2ElementsGreater.java
------------| KMaxSumCombinations.java
------------| KNumbersWithMostOccurrences.java
------------| KSmallestUsingConstantSpace.java
------------| KthLargestSumContiguousSubArray.java
------------| KthSmallestAbsoluteDifference.java
------------| LargestThreeElements.java
------------| MajorityElement.java
------------| MaximumJ_Minus_I.java
------------| MaxOfEveryWindowK.java
------------| MaxRepeatingNumberInOK.java
------------| MaxSumNoAdjacentElements.java
------------| MaxSumPath.java
--------| Rearrangement
------------| AlternatePositiveAndNegative.java
------------| AlternatePositiveNegativeWithConstantSpace.java
------------| MinimumSwapsToBringElementsLTKTogether.java
------------| MoveZeroesToEndInSingleTraversal.java
------------| RearrangeArrayInOrder.java
------------| RearrangeEvenAndOdd.java
------------| RearrangeMaxMinWithoutExtraSpace.java
------------| RearrangeSuchThatAiEQi.java
------------| RearrangeWithRule.java
--------| Rotations
------------| ArrayRotationByGCD.java
------------| FindElementAtPositionAfterRotations.java
------------| MaxHammingDistance.java
------------| MaxSumOfArrayValueIntoIndex.java
------------| PairWithSumXInSortedRotatedArray.java
------------| ReversalAlgorithm.java
------------| SearchingInSortedRotatedArray.java
----| BinarySearchTree
--------| CheckingAndPrinting
------------| ArrayLevelOrderTraversal.java
------------| ArrayPreorderTraversal.java
------------| BinaryTreeIsBST.java
------------| ClosestElementToN.java
------------| DeadEnd.java
------------| FixBST.java
------------| InorderPredAndSucc.java
------------| InorderSuccessor.java
------------| KthSmallestElement.java
------------| ReplaceWithLeastGreatestOnRight.java
------------| ShortestDistanceBetweenNodes.java
------------| SortedSubsequenceExists.java
------------| SumOfKSmallestElements.java
------------| UniqueNumberInSubSequence.java
--------| misc
----| BinaryTree
--------| CheckingAndPrinting
------------| BinarySumTree.java
------------| CheckPreorderSerialization.java
------------| ChildSumProperty.java
------------| FlattenABT.java
------------| FullBinaryTree.java
------------| GoodNodes.java
------------| GraphIsATree.java
------------| KthSmallestInBST.java
------------| LeavesAtSameLevel.java
------------| PerfectBinaryTree.java
------------| PrintDiameter.java
------------| PrintingTreeIterative.java
------------| RootsAtOddLevel.java
------------| RootToLeafPath.java
------------| SameInPrePost.java
------------| UncoveredAndCovered.java
--------| LowestCommonAncestor
------------| AncestorDescendantQuery.java
------------| DistanceBetweenNodes.java
------------| FindingKthAncestor.java
------------| LCAUsing3Arrays.java
------------| LCAUsingOneArray.java
------------| MaxDifferenceBetweenNodeAndAncestor.java
--------| Misc
------------| HouseRobber3.java
------------| LeftView.java
------------| UniqueBinaryTrees.java
--------| NestedParenthesisView.java
--------| Summation
------------| AllPathsWithSumKFromRootToLeaf.java
------------| GenerateNumberFromRootToLeafPath.java
------------| MaximumLeafToRootPath.java
------------| MaxPathSum.java
------------| MaxSubTreeSum.java
------------| PairSumEqualToRoot.java
------------| RemovingPathsLessThanK.java
------------| ReplacementWithInorderNeighbor.java
------------| SubTreesWithSumX.java
------------| SubTreeWithGivenSum.java
------------| sumOfDiagonals.java
------------| SumOfLeftLeaves.java
------------| SumOfParentsOfX.java
------------| SumOfRootsAtALevel.java
------------| SumOfRootToLeafBinaryNumbers.java
------------| VerticalSum.java
--------| Traversals
------------| AncestorMatrix.java
------------| DepthOfATree.java
------------| DiagonalTraversal.java
------------| DiameterOfATree.java
------------| LevelOrderTraversal.java
------------| MinSwapsToMakeBST.java
------------| MorrisTraversal.java
------------| NthNode.java
------------| PostFromPreIn.java
------------| PostorderFromPreorderBST.java
------------| PostOrderIterative.java
------------| ReverseLevelOrder.java
------------| TreeTraversalBasics.java
------------| VerticalTraversalIterative.java
------------| ZigZagTraversal.java
----| Graphs
--------| Backtracking
------------| PathMoreThanK.java
--------| Connectivity
------------| KCores.java
------------| Kosaraju.java
------------| MinimumSetOfVertices.java
------------| MinimumSumOfConnectedComponents.java
------------| MotherVertex.java
------------| NumberOfIslands.java
--------| Cycles
------------| CyclesInDigraph.java
------------| RectanglesWithCircles.java
------------| ShortestChain.java
------------| ShortestSourcePath.java
------------| UnionFind.java
--------| Misc
------------| MaxAreaOfIsland.java
--------| SpanningTrees
------------| Dijkstra.java
------------| FloydWarshall.java
------------| Kruskal.java
------------| MinProductSpanningTree.java
------------| Prims.java
--------| TopologicalSort
------------| AlienDictionary.java
------------| KahnAlgorithm.java
------------| topologicalSort.java
--------| Traversals
------------| bfs.java
------------| BinaryPalindrome.java
------------| CircleOfStrings.java
------------| DetectCycleInGraph.java
------------| dfs.java
------------| JumpingNumbers.java
------------| LengthOfCable.java
------------| LoopInArray.java
------------| MatrixProbability.java
------------| MinimumSwaps.java
------------| NodesAtKDistance.java
------------| NumberOfNodesAtALevel.java
------------| NumberOfPaths.java
------------| SamePath.java
------------| TrianglesInAGraph.java
------------| XIntoY.java
----| LinkedList
--------| CicularLinkedLists
------------| DeletionFromACLL.java
------------| InsertIntoSortedCircularList.java
------------| Josephus.java
------------| SplitList.java
--------| DoublyLinkedLists
--------| SinglyLinkedLists
------------| Adding2NumbersAsLL.java
------------| CheckLoops.java
------------| CountDuplicates.java
------------| EvenAndOddNodes.java
------------| InsertionSortOnLinkedList.java
------------| IntersectionOfLists.java
------------| IntersectionOfTwoLists.java
------------| MergeKSortedLists.java
------------| MiddleOfTheList.java
------------| NextGreaterNode.java
------------| PairwiseSwap.java
------------| PalindromeLinkedList.java
------------| PalindromeList.java
------------| RemoveDuplicatesSorted.java
------------| RemoveDuplicatesUnsorted.java
------------| RemoveNthNodesFromTheEnd.java
------------| ReorderList.java
------------| ReverseALinkedList.java
------------| ReverseList2.java
------------| ReverseNodesInKGroup.java
------------| ReversingAListRecursive.java
------------| RotateList.java
------------| SortingAList.java
------------| SwapNodesAndNotData.java
------------| SwapNodesInPairs.java
----| Queues
--------| FirstNegativeElementInWindow.java
--------| GenerateBinaryTillN.java
--------| InterweaveQueue.java
--------| IterativeHeightOfBT.java
--------| MaxAndMinOfWindowK.java
--------| MaxSumAtCurrentLevel.java
--------| MaxWidthOfBT.java
--------| MinTimeToRotOranges.java
--------| PetrolPumpTour.java
--------| ReverseFirstKElements.java
--------| SortQueueWithoutExtraSpace.java
--------| StackUsing2Queues.java
--------| TaskScheduler.java
----| Stacks
--------| AncestorsOfABinaryTree.java
--------| ArrayPermutations.java
--------| balancingBrackets.java
--------| DepthOfParenthesis.java
--------| FindCelebrity.java
--------| FindClosingBracket.java
--------| GameOfTwoStacks.java
--------| GetMinInO1.java
--------| LargestRectangleInHistogram.java
--------| MaxAndMinOfWindowSize.java
--------| MinNumberOfBracketReversals.java
--------| NGEOnRight.java
--------| PermutationsGEToN.java
--------| RedundantBrackets.java
--------| ReverseStackUsingRecursion.java
--------| SpiralLevelOrder.java
--------| StockSpan.java
----| Strings
--------| Atoi.java
--------| CanonicalPath.java
--------| DuplicateFile.java
--------| GenerateParenthesis.java
--------| GroupAnagrams.java
--------| LongestSubstringWithoutRepeatingCharacters.java
--------| MakingFileNamesUnique.java
--------| PalindromePartioning.java
--------| RepeatingSubstring.java
--------| StringMultiplication.java
--------| ThirdLastConsonant.java
--------| TopKFrequentWords.java
--------| WordPattern.java
--------| ZigZag.java
| HackerEarth
----| BinaryNumbers.java
----| PrasunTheDetective.java
----| ThiefAndWarehouses.java
| JavaSyntaxAndFunctions
----| Basics
--------| AbstractClasses.java
--------| ObjectSwapping.java
----| Inheritance
--------| ObjectCreation.java
--------| UsingInterfaces.java
----| Sets
--------| TreeSetDemo.java
| LeetCode
----| BestTimeToBuyAndSellStock1.java
----| BullsAndCows.java
----| CarPooling.java
----| CombinationSum3.java
----| EvaluatedDivision.java
----| FindAndReplaceInString.java
----| HouseRobber.java
----| HouseRobber2.java
----| InsertInterval.java
----| LargestNumber.java
----| LongestMountainInArray.java
----| MajorityElement2.java
----| MaxXOR.java
----| OddEvenLinkedList.java
----| ProductOfArrayExceptSelf.java
----| SequentialDigits.java
----| SummaryRanges.java
----| SuperUglyNumber.java
----| TeemoAttacking.java
----| UniquePaths3.java

Releases

No releases published

Packages

No packages published

Languages