├── .classpath
├── .project
├── .settings
└── org.eclipse.jdt.core.prefs
├── bin
├── DP
│ ├── BoardPath.class
│ ├── DungeonGame.class
│ ├── EditDistance.class
│ ├── Fibonacci.class
│ ├── KOrderedLCS.class
│ ├── Knapsack.class
│ ├── LCS.class
│ ├── LCS3Strings.class
│ ├── LISNnlogn.class
│ ├── LISn2.class
│ ├── LongestPalindromicSS.class
│ ├── MCM.class
│ ├── MazePath.class
│ ├── MazePathDiagonal.class
│ ├── Mixtures.class
│ ├── NoOfBSTs.class
│ ├── PalindromePartitioning.class
│ ├── RodCut.class
│ ├── WildcardMatching.class
│ └── WineProblem.class
├── L11_Array2D
│ ├── Array2DDemo.class
│ └── Array2DOps.class
├── L12_ArrayList
│ ├── ArrayListDemo.class
│ └── ArrayListOps.class
├── L13_TimeComplexity
│ ├── TimeComplexityOps.class
│ └── TimeSpaceDemo.class
├── L16_Strings
│ ├── Demo.class
│ ├── StringBuilderDemo.class
│ ├── StringDemo.class
│ └── StringOps.class
├── L17_Recursion
│ └── Recursion.class
├── L19_Recursion
│ └── Recursion2.class
├── L1_Basics
│ ├── ConditionalDemo.class
│ ├── EvenOdd.class
│ ├── LoopDemo.class
│ ├── Prime.class
│ ├── Prime2.class
│ ├── SumN.class
│ ├── Test.class
│ └── VariableDemo.class
├── L20_Recursion
│ └── Recursion3.class
├── L23_Leetcode
│ ├── ALDemo.class
│ ├── Backtracking.class
│ ├── CoinChangeCase1CoinRespect.class
│ ├── CoinChangeCase1UserRespect.class
│ ├── CoinChangeCase2CoinRespect.class
│ ├── CoinChangeCase2UserRespect.class
│ ├── CoinChangeCase3CoinRespect.class
│ ├── CoinChangeCase3UserRespect.class
│ ├── PQ.class
│ ├── SubsetCase1ElementRespect.class
│ ├── SubsetCase1UserRespect.class
│ ├── SubsetCase2ElementRespect.class
│ ├── SubsetCase2UserRespect.class
│ ├── _1079_LetterTilePossibilities.class
│ ├── _1291_SequentialDigits.class
│ ├── _216_CombinationSumIII.class
│ ├── _46_Permutations.class
│ ├── _47_PermutationsII.class
│ ├── _60_PermutationSequence.class
│ └── _77_Combinations.class
├── L2_Loops
│ ├── Fibonacci.class
│ ├── HCF.class
│ ├── HCF2.class
│ ├── HCF3.class
│ ├── Pattern0.class
│ ├── Pattern1.class
│ └── Reverse.class
├── L31_DivideConquer
│ └── MergeSort.class
├── L33_OOPS
│ ├── Client.class
│ └── Student.class
├── L34_OOPS
│ ├── Client.class
│ ├── Codechef.class
│ ├── PClient.class
│ ├── Person.class
│ ├── Person2.class
│ └── Student.class
├── L34_Stack
│ ├── SClient.class
│ └── Stack.class
├── L35_Queue
│ ├── QClient.class
│ └── Queue.class
├── L36_Inheritance
│ ├── C.class
│ ├── Client.class
│ ├── P.class
│ ├── SClient.class
│ └── Student.class
├── L37_DynamicStackQueue
│ ├── DQClient.class
│ ├── DSClient.class
│ ├── DynamicQueue.class
│ ├── DynamicStack.class
│ └── StackQs.class
├── L38_MinStack
│ ├── Client.class
│ ├── MinStack.class
│ ├── MinStack2.class
│ └── QueueQs.class
├── L39_LinkedList
│ ├── LLClient.class
│ ├── LinkedList$Node.class
│ └── LinkedList.class
├── L3_Patterns
│ ├── Pattern10.class
│ ├── Pattern11.class
│ ├── Pattern12.class
│ ├── Pattern2.class
│ ├── Pattern3.class
│ ├── Pattern4.class
│ ├── Pattern5.class
│ ├── Pattern6.class
│ └── Pattern9.class
├── L42_BitManipulation
│ ├── BinaryToDecimal.class
│ ├── BitsPrint.class
│ ├── DecimalToBinary.class
│ ├── Demo.class
│ ├── DuplicateMissing.class
│ ├── GrayCode.class
│ ├── KernighansAlgo.class
│ ├── MagicNo.class
│ ├── MissingNumber1.class
│ ├── MissingNumber2.class
│ ├── PowerOf2.class
│ ├── SetBitsCount.class
│ ├── UniqueNumber1.class
│ └── UniqueNumber2.class
├── L45_AccessSpecifier
│ ├── P1
│ │ ├── P1Class.class
│ │ ├── P1Client.class
│ │ └── P1Inherited.class
│ └── P2
│ │ ├── P2Client.class
│ │ └── P2Inherited.class
├── L45_Static
│ ├── C.class
│ ├── Client.class
│ ├── OC$IC.class
│ ├── OC.class
│ ├── Overloading.class
│ ├── P.class
│ └── Student.class
├── L46_HashMap
│ ├── Demo.class
│ ├── HashMapDemo.class
│ └── HashMapOps.class
├── L47_HashMapImplementation
│ ├── Client.class
│ ├── HashMap$Node.class
│ └── HashMap.class
├── L47_QPS
│ ├── AggressiveCows.class
│ ├── BookAllocation.class
│ ├── CountSay.class
│ ├── Dearrangements.class
│ ├── FirstMissingPositive.class
│ ├── HammingDistance.class
│ ├── Hoodies.class
│ ├── IncOps.class
│ ├── KConcatenation.class
│ ├── LLPalindrome.class
│ ├── MST1.class
│ ├── MaxWindowK.class
│ ├── MaximumSumIncreasingSubsequence.class
│ ├── MergeSort$ListNode.class
│ ├── MergeSort.class
│ ├── MergeSortedLL$ListNode.class
│ ├── MergeSortedLL.class
│ ├── MinStepsTo1.class
│ ├── MinimumFallingPathSum.class
│ ├── Partitioning3Way.class
│ ├── PivotIndex.class
│ ├── PrintSubarrays0Sum.class
│ ├── ReorderList.class
│ ├── RottenOranges$Pair.class
│ ├── RottenOranges.class
│ ├── Sort012.class
│ ├── Subarray0sum.class
│ ├── SumSubsequenceWidths.class
│ ├── UglyNumber.class
│ └── ZigZag.class
├── L4_Patterns
│ ├── Pattern13.class
│ ├── Pattern14.class
│ ├── Pattern15.class
│ ├── Pattern16.class
│ ├── Pattern17.class
│ ├── Pattern18.class
│ ├── Pattern20.class
│ ├── Pattern21.class
│ ├── Pattern22.class
│ ├── Pattern23.class
│ ├── Pattern24.class
│ ├── Pattern25.class
│ ├── Pattern26.class
│ ├── Pattern7.class
│ └── Pattern8.class
├── L52_GenericTree
│ ├── GTClient.class
│ ├── GenericTree$Node.class
│ └── GenericTree.class
├── L53_NagarroTest
│ ├── CityTour.class
│ └── TreasureIsland.class
├── L54_BinaryTree
│ ├── BTClient.class
│ ├── BinaryTree$BSTPair.class
│ ├── BinaryTree$BalPair.class
│ ├── BinaryTree$DiaPair.class
│ ├── BinaryTree$LBSTPair.class
│ ├── BinaryTree$MSSPair.class
│ ├── BinaryTree$Node.class
│ ├── BinaryTree$Pair.class
│ ├── BinaryTree$VOPair.class
│ ├── BinaryTree$VOPair2.class
│ ├── BinaryTree.class
│ ├── Client.class
│ ├── LevelOrderTreeConstruct$Node.class
│ ├── LevelOrderTreeConstruct.class
│ ├── PreOrderTreeConstruct$Node.class
│ └── PreOrderTreeConstruct.class
├── L58_BST
│ ├── BST$Node.class
│ ├── BST.class
│ └── Client.class
├── L5_PatternsDataType
│ ├── DataTypeDemo.class
│ ├── Inverse.class
│ ├── Pattern19.class
│ ├── Pattern27.class
│ ├── Pattern28.class
│ ├── Pattern29.class
│ ├── Pattern30.class
│ ├── Pattern31.class
│ ├── Pattern32.class
│ ├── PatternRhombus.class
│ └── Rotate.class
├── L60_AVL
│ ├── AVL$Node.class
│ ├── AVL.class
│ └── Client.class
├── L61_Generics
│ ├── Class
│ │ ├── Client.class
│ │ ├── LinkedListGeneric$Node.class
│ │ ├── LinkedListGeneric.class
│ │ └── Pair.class
│ └── Fxn
│ │ ├── Car.class
│ │ ├── CarColorComparator.class
│ │ ├── CarPriceComparator.class
│ │ ├── CarSpeedComparator.class
│ │ ├── Demo.class
│ │ └── IntegerComparator.class
├── L61_Interfaces
│ ├── C.class
│ ├── Client.class
│ ├── DSI.class
│ ├── I1.class
│ ├── I2.class
│ ├── Stack.class
│ └── StackI.class
├── L62_Heap
│ ├── HeaoQs$KLPair.class
│ ├── HeaoQs$Pair.class
│ ├── HeaoQs.class
│ ├── Heap.class
│ ├── HeapClient.class
│ ├── HeapGClient.class
│ └── HeapGeneric.class
├── L63_Graph
│ ├── Client.class
│ ├── Graph$DijkstraPair.class
│ ├── Graph$DisjointSet$Node.class
│ ├── Graph$DisjointSet.class
│ ├── Graph$EdgePair.class
│ ├── Graph$Pair.class
│ ├── Graph$PrimsPair.class
│ └── Graph.class
├── L69_SegmentTree
│ ├── Client.class
│ ├── QueryMax.class
│ ├── QueryMin.class
│ ├── QueryProduct.class
│ ├── QuerySum.class
│ ├── STI.class
│ ├── SegmentTree$Node.class
│ └── SegmentTree.class
├── L6_Functions
│ ├── Armstrong.class
│ ├── FunctionDemo.class
│ └── ShoppingGame.class
├── L71_Huffman
│ ├── Client.class
│ ├── Huffman$Node.class
│ └── Huffman.class
├── L71_Trie
│ ├── Client.class
│ ├── Trie$Node.class
│ └── Trie.class
├── L72_Abstract
│ ├── DataStructure.class
│ └── Stack.class
├── L72_NagarroTest
│ ├── JobScheduling$PP.class
│ ├── JobScheduling.class
│ └── NeedForSpeed.class
└── L7_Array
│ ├── ArrayDemo.class
│ ├── ArrayOps.class
│ └── PairOfRoses.class
└── src
├── DP
├── BoardPath.java
├── DungeonGame.java
├── EditDistance.java
├── Fibonacci.java
├── KOrderedLCS.java
├── Knapsack.java
├── LCS.java
├── LCS3Strings.java
├── LISNnlogn.java
├── LISn2.java
├── LongestPalindromicSS.java
├── MCM.java
├── MazePath.java
├── MazePathDiagonal.java
├── Mixtures.java
├── NoOfBSTs.java
├── PalindromePartitioning.java
├── RodCut.java
├── WildcardMatching.java
└── WineProblem.java
├── L11_Array2D
├── Array2DDemo.java
└── Array2DOps.java
├── L12_ArrayList
├── ArrayListDemo.java
└── ArrayListOps.java
├── L13_TimeComplexity
├── TimeComplexityOps.java
└── TimeSpaceDemo.java
├── L16_Strings
├── Demo.java
├── StringBuilderDemo.java
├── StringDemo.java
└── StringOps.java
├── L17_Recursion
└── Recursion.java
├── L19_Recursion
└── Recursion2.java
├── L1_Basics
├── ConditionalDemo.java
├── EvenOdd.java
├── LoopDemo.java
├── Prime.java
├── Prime2.java
├── SumN.java
├── Test.java
└── VariableDemo.java
├── L20_Recursion
└── Recursion3.java
├── L23_Leetcode
├── ALDemo.java
├── Backtracking.java
├── CoinChangeCase1CoinRespect.java
├── CoinChangeCase1UserRespect.java
├── CoinChangeCase2CoinRespect.java
├── CoinChangeCase2UserRespect.java
├── CoinChangeCase3CoinRespect.java
├── CoinChangeCase3UserRespect.java
├── PQ.java
├── SubsetCase1ElementRespect.java
├── SubsetCase1UserRespect.java
├── SubsetCase2ElementRespect.java
├── SubsetCase2UserRespect.java
├── _1079_LetterTilePossibilities.java
├── _1291_SequentialDigits.java
├── _216_CombinationSumIII.java
├── _46_Permutations.java
├── _47_PermutationsII.java
├── _60_PermutationSequence.java
└── _77_Combinations.java
├── L2_Loops
├── Fibonacci.java
├── HCF.java
├── HCF2.java
├── HCF3.java
├── Pattern0.java
├── Pattern1.java
└── Reverse.java
├── L31_DivideConquer
└── MergeSort.java
├── L33_OOPS
├── Client.java
└── Student.java
├── L34_OOPS
├── Client.java
├── Codechef.java
├── PClient.java
├── Person.java
├── Person2.java
└── Student.java
├── L34_Stack
├── SClient.java
└── Stack.java
├── L35_Queue
├── QClient.java
└── Queue.java
├── L36_Inheritance
├── C.java
├── Client.java
├── P.java
├── SClient.java
└── Student.java
├── L37_DynamicStackQueue
├── DQClient.java
├── DSClient.java
├── DynamicQueue.java
├── DynamicStack.java
└── StackQs.java
├── L38_MinStack
├── Client.java
├── MinStack.java
├── MinStack2.java
└── QueueQs.java
├── L39_LinkedList
├── LLClient.java
└── LinkedList.java
├── L3_Patterns
├── Pattern10.java
├── Pattern11.java
├── Pattern12.java
├── Pattern2.java
├── Pattern3.java
├── Pattern4.java
├── Pattern5.java
├── Pattern6.java
└── Pattern9.java
├── L42_BitManipulation
├── BinaryToDecimal.java
├── BitsPrint.java
├── DecimalToBinary.java
├── Demo.java
├── DuplicateMissing.java
├── GrayCode.java
├── KernighansAlgo.java
├── MagicNo.java
├── MissingNumber1.java
├── MissingNumber2.java
├── PowerOf2.java
├── SetBitsCount.java
├── UniqueNumber1.java
└── UniqueNumber2.java
├── L45_AccessSpecifier
├── P1
│ ├── P1Class.java
│ ├── P1Client.java
│ └── P1Inherited.java
└── P2
│ ├── P2Client.java
│ └── P2Inherited.java
├── L45_Static
├── C.java
├── Client.java
├── OC.java
├── Overloading.java
├── P.java
└── Student.java
├── L46_HashMap
├── Demo.java
├── HashMapDemo.java
└── HashMapOps.java
├── L47_HashMapImplementation
├── Client.java
└── HashMap.java
├── L47_QPS
├── AggressiveCows.java
├── BookAllocation.java
├── CountSay.java
├── Dearrangements.java
├── FirstMissingPositive.java
├── HammingDistance.java
├── Hoodies.java
├── IncOps.java
├── KConcatenation.java
├── LLPalindrome.java
├── MST1.java
├── MaxWindowK.java
├── MaximumSumIncreasingSubsequence.java
├── MergeSort.java
├── MergeSortedLL.java
├── MinStepsTo1.java
├── MinimumFallingPathSum.java
├── Partitioning3Way.java
├── PivotIndex.java
├── PrintSubarrays0Sum.java
├── ReorderList.java
├── RottenOranges.java
├── Sort012.java
├── Subarray0sum.java
├── SumSubsequenceWidths.java
├── UglyNumber.java
└── ZigZag.java
├── L4_Patterns
├── Pattern13.java
├── Pattern14.java
├── Pattern15.java
├── Pattern16.java
├── Pattern17.java
├── Pattern18.java
├── Pattern20.java
├── Pattern21.java
├── Pattern22.java
├── Pattern23.java
├── Pattern24.java
├── Pattern25.java
├── Pattern26.java
├── Pattern7.java
└── Pattern8.java
├── L52_GenericTree
├── GTClient.java
└── GenericTree.java
├── L53_NagarroTest
├── CityTour.java
└── TreasureIsland.java
├── L54_BinaryTree
├── BTClient.java
├── BinaryTree.java
├── Client.java
├── LevelOrderTreeConstruct.java
└── PreOrderTreeConstruct.java
├── L58_BST
├── BST.java
└── Client.java
├── L5_PatternsDataType
├── DataTypeDemo.java
├── Inverse.java
├── Pattern19.java
├── Pattern27.java
├── Pattern28.java
├── Pattern29.java
├── Pattern30.java
├── Pattern31.java
├── Pattern32.java
├── PatternRhombus.java
└── Rotate.java
├── L60_AVL
├── AVL.java
└── Client.java
├── L61_Generics
├── Class
│ ├── Client.java
│ ├── LinkedListGeneric.java
│ └── Pair.java
└── Fxn
│ ├── Car.java
│ ├── CarColorComparator.java
│ ├── CarPriceComparator.java
│ ├── CarSpeedComparator.java
│ ├── Demo.java
│ └── IntegerComparator.java
├── L61_Interfaces
├── C.java
├── Client.java
├── DSI.java
├── I1.java
├── I2.java
├── Stack.java
└── StackI.java
├── L62_Heap
├── HeaoQs.java
├── Heap.java
├── HeapClient.java
├── HeapGClient.java
└── HeapGeneric.java
├── L63_Graph
├── Client.java
└── Graph.java
├── L69_SegmentTree
├── Client.java
├── QueryMax.java
├── QueryMin.java
├── QueryProduct.java
├── QuerySum.java
├── STI.java
└── SegmentTree.java
├── L6_Functions
├── Armstrong.java
├── FunctionDemo.java
└── ShoppingGame.java
├── L71_Huffman
├── Client.java
└── Huffman.java
├── L71_Trie
├── Client.java
└── Trie.java
├── L72_Abstract
├── DataStructure.java
└── Stack.java
├── L72_NagarroTest
├── JobScheduling.java
└── NeedForSpeed.java
├── L7_Array
├── ArrayDemo.java
├── ArrayOps.java
└── PairOfRoses.java
└── Nagarro_Qps
├── Buy_and_Sell.java
├── Gas_Station.java
├── Kartik_Bhaiya_String.java
└── Leet_Code_Prodect.java
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | NagarroBootcamp
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=15
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=15
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13 | org.eclipse.jdt.core.compiler.release=enabled
14 | org.eclipse.jdt.core.compiler.source=15
15 |
--------------------------------------------------------------------------------
/bin/DP/BoardPath.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/BoardPath.class
--------------------------------------------------------------------------------
/bin/DP/DungeonGame.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/DungeonGame.class
--------------------------------------------------------------------------------
/bin/DP/EditDistance.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/EditDistance.class
--------------------------------------------------------------------------------
/bin/DP/Fibonacci.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/Fibonacci.class
--------------------------------------------------------------------------------
/bin/DP/KOrderedLCS.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/KOrderedLCS.class
--------------------------------------------------------------------------------
/bin/DP/Knapsack.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/Knapsack.class
--------------------------------------------------------------------------------
/bin/DP/LCS.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/LCS.class
--------------------------------------------------------------------------------
/bin/DP/LCS3Strings.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/LCS3Strings.class
--------------------------------------------------------------------------------
/bin/DP/LISNnlogn.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/LISNnlogn.class
--------------------------------------------------------------------------------
/bin/DP/LISn2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/LISn2.class
--------------------------------------------------------------------------------
/bin/DP/LongestPalindromicSS.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/LongestPalindromicSS.class
--------------------------------------------------------------------------------
/bin/DP/MCM.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/MCM.class
--------------------------------------------------------------------------------
/bin/DP/MazePath.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/MazePath.class
--------------------------------------------------------------------------------
/bin/DP/MazePathDiagonal.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/MazePathDiagonal.class
--------------------------------------------------------------------------------
/bin/DP/Mixtures.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/Mixtures.class
--------------------------------------------------------------------------------
/bin/DP/NoOfBSTs.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/NoOfBSTs.class
--------------------------------------------------------------------------------
/bin/DP/PalindromePartitioning.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/PalindromePartitioning.class
--------------------------------------------------------------------------------
/bin/DP/RodCut.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/RodCut.class
--------------------------------------------------------------------------------
/bin/DP/WildcardMatching.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/WildcardMatching.class
--------------------------------------------------------------------------------
/bin/DP/WineProblem.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/DP/WineProblem.class
--------------------------------------------------------------------------------
/bin/L11_Array2D/Array2DDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L11_Array2D/Array2DDemo.class
--------------------------------------------------------------------------------
/bin/L11_Array2D/Array2DOps.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L11_Array2D/Array2DOps.class
--------------------------------------------------------------------------------
/bin/L12_ArrayList/ArrayListDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L12_ArrayList/ArrayListDemo.class
--------------------------------------------------------------------------------
/bin/L12_ArrayList/ArrayListOps.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L12_ArrayList/ArrayListOps.class
--------------------------------------------------------------------------------
/bin/L13_TimeComplexity/TimeComplexityOps.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L13_TimeComplexity/TimeComplexityOps.class
--------------------------------------------------------------------------------
/bin/L13_TimeComplexity/TimeSpaceDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L13_TimeComplexity/TimeSpaceDemo.class
--------------------------------------------------------------------------------
/bin/L16_Strings/Demo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L16_Strings/Demo.class
--------------------------------------------------------------------------------
/bin/L16_Strings/StringBuilderDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L16_Strings/StringBuilderDemo.class
--------------------------------------------------------------------------------
/bin/L16_Strings/StringDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L16_Strings/StringDemo.class
--------------------------------------------------------------------------------
/bin/L16_Strings/StringOps.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L16_Strings/StringOps.class
--------------------------------------------------------------------------------
/bin/L17_Recursion/Recursion.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L17_Recursion/Recursion.class
--------------------------------------------------------------------------------
/bin/L19_Recursion/Recursion2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L19_Recursion/Recursion2.class
--------------------------------------------------------------------------------
/bin/L1_Basics/ConditionalDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L1_Basics/ConditionalDemo.class
--------------------------------------------------------------------------------
/bin/L1_Basics/EvenOdd.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L1_Basics/EvenOdd.class
--------------------------------------------------------------------------------
/bin/L1_Basics/LoopDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L1_Basics/LoopDemo.class
--------------------------------------------------------------------------------
/bin/L1_Basics/Prime.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L1_Basics/Prime.class
--------------------------------------------------------------------------------
/bin/L1_Basics/Prime2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L1_Basics/Prime2.class
--------------------------------------------------------------------------------
/bin/L1_Basics/SumN.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L1_Basics/SumN.class
--------------------------------------------------------------------------------
/bin/L1_Basics/Test.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L1_Basics/Test.class
--------------------------------------------------------------------------------
/bin/L1_Basics/VariableDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L1_Basics/VariableDemo.class
--------------------------------------------------------------------------------
/bin/L20_Recursion/Recursion3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L20_Recursion/Recursion3.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/ALDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/ALDemo.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/Backtracking.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/Backtracking.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/CoinChangeCase1CoinRespect.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/CoinChangeCase1CoinRespect.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/CoinChangeCase1UserRespect.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/CoinChangeCase1UserRespect.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/CoinChangeCase2CoinRespect.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/CoinChangeCase2CoinRespect.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/CoinChangeCase2UserRespect.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/CoinChangeCase2UserRespect.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/CoinChangeCase3CoinRespect.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/CoinChangeCase3CoinRespect.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/CoinChangeCase3UserRespect.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/CoinChangeCase3UserRespect.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/PQ.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/PQ.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/SubsetCase1ElementRespect.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/SubsetCase1ElementRespect.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/SubsetCase1UserRespect.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/SubsetCase1UserRespect.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/SubsetCase2ElementRespect.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/SubsetCase2ElementRespect.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/SubsetCase2UserRespect.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/SubsetCase2UserRespect.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/_1079_LetterTilePossibilities.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/_1079_LetterTilePossibilities.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/_1291_SequentialDigits.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/_1291_SequentialDigits.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/_216_CombinationSumIII.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/_216_CombinationSumIII.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/_46_Permutations.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/_46_Permutations.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/_47_PermutationsII.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/_47_PermutationsII.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/_60_PermutationSequence.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/_60_PermutationSequence.class
--------------------------------------------------------------------------------
/bin/L23_Leetcode/_77_Combinations.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L23_Leetcode/_77_Combinations.class
--------------------------------------------------------------------------------
/bin/L2_Loops/Fibonacci.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L2_Loops/Fibonacci.class
--------------------------------------------------------------------------------
/bin/L2_Loops/HCF.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L2_Loops/HCF.class
--------------------------------------------------------------------------------
/bin/L2_Loops/HCF2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L2_Loops/HCF2.class
--------------------------------------------------------------------------------
/bin/L2_Loops/HCF3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L2_Loops/HCF3.class
--------------------------------------------------------------------------------
/bin/L2_Loops/Pattern0.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L2_Loops/Pattern0.class
--------------------------------------------------------------------------------
/bin/L2_Loops/Pattern1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L2_Loops/Pattern1.class
--------------------------------------------------------------------------------
/bin/L2_Loops/Reverse.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L2_Loops/Reverse.class
--------------------------------------------------------------------------------
/bin/L31_DivideConquer/MergeSort.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L31_DivideConquer/MergeSort.class
--------------------------------------------------------------------------------
/bin/L33_OOPS/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L33_OOPS/Client.class
--------------------------------------------------------------------------------
/bin/L33_OOPS/Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L33_OOPS/Student.class
--------------------------------------------------------------------------------
/bin/L34_OOPS/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L34_OOPS/Client.class
--------------------------------------------------------------------------------
/bin/L34_OOPS/Codechef.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L34_OOPS/Codechef.class
--------------------------------------------------------------------------------
/bin/L34_OOPS/PClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L34_OOPS/PClient.class
--------------------------------------------------------------------------------
/bin/L34_OOPS/Person.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L34_OOPS/Person.class
--------------------------------------------------------------------------------
/bin/L34_OOPS/Person2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L34_OOPS/Person2.class
--------------------------------------------------------------------------------
/bin/L34_OOPS/Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L34_OOPS/Student.class
--------------------------------------------------------------------------------
/bin/L34_Stack/SClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L34_Stack/SClient.class
--------------------------------------------------------------------------------
/bin/L34_Stack/Stack.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L34_Stack/Stack.class
--------------------------------------------------------------------------------
/bin/L35_Queue/QClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L35_Queue/QClient.class
--------------------------------------------------------------------------------
/bin/L35_Queue/Queue.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L35_Queue/Queue.class
--------------------------------------------------------------------------------
/bin/L36_Inheritance/C.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L36_Inheritance/C.class
--------------------------------------------------------------------------------
/bin/L36_Inheritance/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L36_Inheritance/Client.class
--------------------------------------------------------------------------------
/bin/L36_Inheritance/P.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L36_Inheritance/P.class
--------------------------------------------------------------------------------
/bin/L36_Inheritance/SClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L36_Inheritance/SClient.class
--------------------------------------------------------------------------------
/bin/L36_Inheritance/Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L36_Inheritance/Student.class
--------------------------------------------------------------------------------
/bin/L37_DynamicStackQueue/DQClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L37_DynamicStackQueue/DQClient.class
--------------------------------------------------------------------------------
/bin/L37_DynamicStackQueue/DSClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L37_DynamicStackQueue/DSClient.class
--------------------------------------------------------------------------------
/bin/L37_DynamicStackQueue/DynamicQueue.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L37_DynamicStackQueue/DynamicQueue.class
--------------------------------------------------------------------------------
/bin/L37_DynamicStackQueue/DynamicStack.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L37_DynamicStackQueue/DynamicStack.class
--------------------------------------------------------------------------------
/bin/L37_DynamicStackQueue/StackQs.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L37_DynamicStackQueue/StackQs.class
--------------------------------------------------------------------------------
/bin/L38_MinStack/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L38_MinStack/Client.class
--------------------------------------------------------------------------------
/bin/L38_MinStack/MinStack.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L38_MinStack/MinStack.class
--------------------------------------------------------------------------------
/bin/L38_MinStack/MinStack2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L38_MinStack/MinStack2.class
--------------------------------------------------------------------------------
/bin/L38_MinStack/QueueQs.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L38_MinStack/QueueQs.class
--------------------------------------------------------------------------------
/bin/L39_LinkedList/LLClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L39_LinkedList/LLClient.class
--------------------------------------------------------------------------------
/bin/L39_LinkedList/LinkedList$Node.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L39_LinkedList/LinkedList$Node.class
--------------------------------------------------------------------------------
/bin/L39_LinkedList/LinkedList.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L39_LinkedList/LinkedList.class
--------------------------------------------------------------------------------
/bin/L3_Patterns/Pattern10.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L3_Patterns/Pattern10.class
--------------------------------------------------------------------------------
/bin/L3_Patterns/Pattern11.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L3_Patterns/Pattern11.class
--------------------------------------------------------------------------------
/bin/L3_Patterns/Pattern12.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L3_Patterns/Pattern12.class
--------------------------------------------------------------------------------
/bin/L3_Patterns/Pattern2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L3_Patterns/Pattern2.class
--------------------------------------------------------------------------------
/bin/L3_Patterns/Pattern3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L3_Patterns/Pattern3.class
--------------------------------------------------------------------------------
/bin/L3_Patterns/Pattern4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L3_Patterns/Pattern4.class
--------------------------------------------------------------------------------
/bin/L3_Patterns/Pattern5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L3_Patterns/Pattern5.class
--------------------------------------------------------------------------------
/bin/L3_Patterns/Pattern6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L3_Patterns/Pattern6.class
--------------------------------------------------------------------------------
/bin/L3_Patterns/Pattern9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L3_Patterns/Pattern9.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/BinaryToDecimal.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/BinaryToDecimal.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/BitsPrint.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/BitsPrint.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/DecimalToBinary.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/DecimalToBinary.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/Demo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/Demo.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/DuplicateMissing.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/DuplicateMissing.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/GrayCode.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/GrayCode.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/KernighansAlgo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/KernighansAlgo.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/MagicNo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/MagicNo.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/MissingNumber1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/MissingNumber1.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/MissingNumber2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/MissingNumber2.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/PowerOf2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/PowerOf2.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/SetBitsCount.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/SetBitsCount.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/UniqueNumber1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/UniqueNumber1.class
--------------------------------------------------------------------------------
/bin/L42_BitManipulation/UniqueNumber2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L42_BitManipulation/UniqueNumber2.class
--------------------------------------------------------------------------------
/bin/L45_AccessSpecifier/P1/P1Class.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L45_AccessSpecifier/P1/P1Class.class
--------------------------------------------------------------------------------
/bin/L45_AccessSpecifier/P1/P1Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L45_AccessSpecifier/P1/P1Client.class
--------------------------------------------------------------------------------
/bin/L45_AccessSpecifier/P1/P1Inherited.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L45_AccessSpecifier/P1/P1Inherited.class
--------------------------------------------------------------------------------
/bin/L45_AccessSpecifier/P2/P2Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L45_AccessSpecifier/P2/P2Client.class
--------------------------------------------------------------------------------
/bin/L45_AccessSpecifier/P2/P2Inherited.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L45_AccessSpecifier/P2/P2Inherited.class
--------------------------------------------------------------------------------
/bin/L45_Static/C.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L45_Static/C.class
--------------------------------------------------------------------------------
/bin/L45_Static/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L45_Static/Client.class
--------------------------------------------------------------------------------
/bin/L45_Static/OC$IC.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L45_Static/OC$IC.class
--------------------------------------------------------------------------------
/bin/L45_Static/OC.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L45_Static/OC.class
--------------------------------------------------------------------------------
/bin/L45_Static/Overloading.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L45_Static/Overloading.class
--------------------------------------------------------------------------------
/bin/L45_Static/P.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L45_Static/P.class
--------------------------------------------------------------------------------
/bin/L45_Static/Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L45_Static/Student.class
--------------------------------------------------------------------------------
/bin/L46_HashMap/Demo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L46_HashMap/Demo.class
--------------------------------------------------------------------------------
/bin/L46_HashMap/HashMapDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L46_HashMap/HashMapDemo.class
--------------------------------------------------------------------------------
/bin/L46_HashMap/HashMapOps.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L46_HashMap/HashMapOps.class
--------------------------------------------------------------------------------
/bin/L47_HashMapImplementation/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_HashMapImplementation/Client.class
--------------------------------------------------------------------------------
/bin/L47_HashMapImplementation/HashMap$Node.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_HashMapImplementation/HashMap$Node.class
--------------------------------------------------------------------------------
/bin/L47_HashMapImplementation/HashMap.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_HashMapImplementation/HashMap.class
--------------------------------------------------------------------------------
/bin/L47_QPS/AggressiveCows.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/AggressiveCows.class
--------------------------------------------------------------------------------
/bin/L47_QPS/BookAllocation.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/BookAllocation.class
--------------------------------------------------------------------------------
/bin/L47_QPS/CountSay.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/CountSay.class
--------------------------------------------------------------------------------
/bin/L47_QPS/Dearrangements.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/Dearrangements.class
--------------------------------------------------------------------------------
/bin/L47_QPS/FirstMissingPositive.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/FirstMissingPositive.class
--------------------------------------------------------------------------------
/bin/L47_QPS/HammingDistance.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/HammingDistance.class
--------------------------------------------------------------------------------
/bin/L47_QPS/Hoodies.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/Hoodies.class
--------------------------------------------------------------------------------
/bin/L47_QPS/IncOps.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/IncOps.class
--------------------------------------------------------------------------------
/bin/L47_QPS/KConcatenation.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/KConcatenation.class
--------------------------------------------------------------------------------
/bin/L47_QPS/LLPalindrome.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/LLPalindrome.class
--------------------------------------------------------------------------------
/bin/L47_QPS/MST1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/MST1.class
--------------------------------------------------------------------------------
/bin/L47_QPS/MaxWindowK.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/MaxWindowK.class
--------------------------------------------------------------------------------
/bin/L47_QPS/MaximumSumIncreasingSubsequence.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/MaximumSumIncreasingSubsequence.class
--------------------------------------------------------------------------------
/bin/L47_QPS/MergeSort$ListNode.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/MergeSort$ListNode.class
--------------------------------------------------------------------------------
/bin/L47_QPS/MergeSort.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/MergeSort.class
--------------------------------------------------------------------------------
/bin/L47_QPS/MergeSortedLL$ListNode.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/MergeSortedLL$ListNode.class
--------------------------------------------------------------------------------
/bin/L47_QPS/MergeSortedLL.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/MergeSortedLL.class
--------------------------------------------------------------------------------
/bin/L47_QPS/MinStepsTo1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/MinStepsTo1.class
--------------------------------------------------------------------------------
/bin/L47_QPS/MinimumFallingPathSum.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/MinimumFallingPathSum.class
--------------------------------------------------------------------------------
/bin/L47_QPS/Partitioning3Way.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/Partitioning3Way.class
--------------------------------------------------------------------------------
/bin/L47_QPS/PivotIndex.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/PivotIndex.class
--------------------------------------------------------------------------------
/bin/L47_QPS/PrintSubarrays0Sum.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/PrintSubarrays0Sum.class
--------------------------------------------------------------------------------
/bin/L47_QPS/ReorderList.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/ReorderList.class
--------------------------------------------------------------------------------
/bin/L47_QPS/RottenOranges$Pair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/RottenOranges$Pair.class
--------------------------------------------------------------------------------
/bin/L47_QPS/RottenOranges.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/RottenOranges.class
--------------------------------------------------------------------------------
/bin/L47_QPS/Sort012.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/Sort012.class
--------------------------------------------------------------------------------
/bin/L47_QPS/Subarray0sum.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/Subarray0sum.class
--------------------------------------------------------------------------------
/bin/L47_QPS/SumSubsequenceWidths.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/SumSubsequenceWidths.class
--------------------------------------------------------------------------------
/bin/L47_QPS/UglyNumber.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/UglyNumber.class
--------------------------------------------------------------------------------
/bin/L47_QPS/ZigZag.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L47_QPS/ZigZag.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern13.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern13.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern14.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern14.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern15.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern15.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern16.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern16.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern17.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern17.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern18.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern18.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern20.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern20.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern21.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern21.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern22.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern22.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern23.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern23.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern24.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern24.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern25.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern25.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern26.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern26.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern7.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern7.class
--------------------------------------------------------------------------------
/bin/L4_Patterns/Pattern8.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L4_Patterns/Pattern8.class
--------------------------------------------------------------------------------
/bin/L52_GenericTree/GTClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L52_GenericTree/GTClient.class
--------------------------------------------------------------------------------
/bin/L52_GenericTree/GenericTree$Node.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L52_GenericTree/GenericTree$Node.class
--------------------------------------------------------------------------------
/bin/L52_GenericTree/GenericTree.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L52_GenericTree/GenericTree.class
--------------------------------------------------------------------------------
/bin/L53_NagarroTest/CityTour.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L53_NagarroTest/CityTour.class
--------------------------------------------------------------------------------
/bin/L53_NagarroTest/TreasureIsland.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L53_NagarroTest/TreasureIsland.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/BTClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/BTClient.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/BinaryTree$BSTPair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/BinaryTree$BSTPair.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/BinaryTree$BalPair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/BinaryTree$BalPair.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/BinaryTree$DiaPair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/BinaryTree$DiaPair.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/BinaryTree$LBSTPair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/BinaryTree$LBSTPair.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/BinaryTree$MSSPair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/BinaryTree$MSSPair.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/BinaryTree$Node.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/BinaryTree$Node.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/BinaryTree$Pair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/BinaryTree$Pair.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/BinaryTree$VOPair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/BinaryTree$VOPair.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/BinaryTree$VOPair2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/BinaryTree$VOPair2.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/BinaryTree.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/BinaryTree.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/Client.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/LevelOrderTreeConstruct$Node.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/LevelOrderTreeConstruct$Node.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/LevelOrderTreeConstruct.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/LevelOrderTreeConstruct.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/PreOrderTreeConstruct$Node.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/PreOrderTreeConstruct$Node.class
--------------------------------------------------------------------------------
/bin/L54_BinaryTree/PreOrderTreeConstruct.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L54_BinaryTree/PreOrderTreeConstruct.class
--------------------------------------------------------------------------------
/bin/L58_BST/BST$Node.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L58_BST/BST$Node.class
--------------------------------------------------------------------------------
/bin/L58_BST/BST.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L58_BST/BST.class
--------------------------------------------------------------------------------
/bin/L58_BST/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L58_BST/Client.class
--------------------------------------------------------------------------------
/bin/L5_PatternsDataType/DataTypeDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L5_PatternsDataType/DataTypeDemo.class
--------------------------------------------------------------------------------
/bin/L5_PatternsDataType/Inverse.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L5_PatternsDataType/Inverse.class
--------------------------------------------------------------------------------
/bin/L5_PatternsDataType/Pattern19.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L5_PatternsDataType/Pattern19.class
--------------------------------------------------------------------------------
/bin/L5_PatternsDataType/Pattern27.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L5_PatternsDataType/Pattern27.class
--------------------------------------------------------------------------------
/bin/L5_PatternsDataType/Pattern28.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L5_PatternsDataType/Pattern28.class
--------------------------------------------------------------------------------
/bin/L5_PatternsDataType/Pattern29.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L5_PatternsDataType/Pattern29.class
--------------------------------------------------------------------------------
/bin/L5_PatternsDataType/Pattern30.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L5_PatternsDataType/Pattern30.class
--------------------------------------------------------------------------------
/bin/L5_PatternsDataType/Pattern31.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L5_PatternsDataType/Pattern31.class
--------------------------------------------------------------------------------
/bin/L5_PatternsDataType/Pattern32.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L5_PatternsDataType/Pattern32.class
--------------------------------------------------------------------------------
/bin/L5_PatternsDataType/PatternRhombus.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L5_PatternsDataType/PatternRhombus.class
--------------------------------------------------------------------------------
/bin/L5_PatternsDataType/Rotate.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L5_PatternsDataType/Rotate.class
--------------------------------------------------------------------------------
/bin/L60_AVL/AVL$Node.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L60_AVL/AVL$Node.class
--------------------------------------------------------------------------------
/bin/L60_AVL/AVL.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L60_AVL/AVL.class
--------------------------------------------------------------------------------
/bin/L60_AVL/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L60_AVL/Client.class
--------------------------------------------------------------------------------
/bin/L61_Generics/Class/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Generics/Class/Client.class
--------------------------------------------------------------------------------
/bin/L61_Generics/Class/LinkedListGeneric$Node.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Generics/Class/LinkedListGeneric$Node.class
--------------------------------------------------------------------------------
/bin/L61_Generics/Class/LinkedListGeneric.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Generics/Class/LinkedListGeneric.class
--------------------------------------------------------------------------------
/bin/L61_Generics/Class/Pair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Generics/Class/Pair.class
--------------------------------------------------------------------------------
/bin/L61_Generics/Fxn/Car.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Generics/Fxn/Car.class
--------------------------------------------------------------------------------
/bin/L61_Generics/Fxn/CarColorComparator.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Generics/Fxn/CarColorComparator.class
--------------------------------------------------------------------------------
/bin/L61_Generics/Fxn/CarPriceComparator.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Generics/Fxn/CarPriceComparator.class
--------------------------------------------------------------------------------
/bin/L61_Generics/Fxn/CarSpeedComparator.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Generics/Fxn/CarSpeedComparator.class
--------------------------------------------------------------------------------
/bin/L61_Generics/Fxn/Demo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Generics/Fxn/Demo.class
--------------------------------------------------------------------------------
/bin/L61_Generics/Fxn/IntegerComparator.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Generics/Fxn/IntegerComparator.class
--------------------------------------------------------------------------------
/bin/L61_Interfaces/C.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Interfaces/C.class
--------------------------------------------------------------------------------
/bin/L61_Interfaces/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Interfaces/Client.class
--------------------------------------------------------------------------------
/bin/L61_Interfaces/DSI.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Interfaces/DSI.class
--------------------------------------------------------------------------------
/bin/L61_Interfaces/I1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Interfaces/I1.class
--------------------------------------------------------------------------------
/bin/L61_Interfaces/I2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Interfaces/I2.class
--------------------------------------------------------------------------------
/bin/L61_Interfaces/Stack.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Interfaces/Stack.class
--------------------------------------------------------------------------------
/bin/L61_Interfaces/StackI.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L61_Interfaces/StackI.class
--------------------------------------------------------------------------------
/bin/L62_Heap/HeaoQs$KLPair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L62_Heap/HeaoQs$KLPair.class
--------------------------------------------------------------------------------
/bin/L62_Heap/HeaoQs$Pair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L62_Heap/HeaoQs$Pair.class
--------------------------------------------------------------------------------
/bin/L62_Heap/HeaoQs.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L62_Heap/HeaoQs.class
--------------------------------------------------------------------------------
/bin/L62_Heap/Heap.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L62_Heap/Heap.class
--------------------------------------------------------------------------------
/bin/L62_Heap/HeapClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L62_Heap/HeapClient.class
--------------------------------------------------------------------------------
/bin/L62_Heap/HeapGClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L62_Heap/HeapGClient.class
--------------------------------------------------------------------------------
/bin/L62_Heap/HeapGeneric.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L62_Heap/HeapGeneric.class
--------------------------------------------------------------------------------
/bin/L63_Graph/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L63_Graph/Client.class
--------------------------------------------------------------------------------
/bin/L63_Graph/Graph$DijkstraPair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L63_Graph/Graph$DijkstraPair.class
--------------------------------------------------------------------------------
/bin/L63_Graph/Graph$DisjointSet$Node.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L63_Graph/Graph$DisjointSet$Node.class
--------------------------------------------------------------------------------
/bin/L63_Graph/Graph$DisjointSet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L63_Graph/Graph$DisjointSet.class
--------------------------------------------------------------------------------
/bin/L63_Graph/Graph$EdgePair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L63_Graph/Graph$EdgePair.class
--------------------------------------------------------------------------------
/bin/L63_Graph/Graph$Pair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L63_Graph/Graph$Pair.class
--------------------------------------------------------------------------------
/bin/L63_Graph/Graph$PrimsPair.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L63_Graph/Graph$PrimsPair.class
--------------------------------------------------------------------------------
/bin/L63_Graph/Graph.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L63_Graph/Graph.class
--------------------------------------------------------------------------------
/bin/L69_SegmentTree/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L69_SegmentTree/Client.class
--------------------------------------------------------------------------------
/bin/L69_SegmentTree/QueryMax.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L69_SegmentTree/QueryMax.class
--------------------------------------------------------------------------------
/bin/L69_SegmentTree/QueryMin.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L69_SegmentTree/QueryMin.class
--------------------------------------------------------------------------------
/bin/L69_SegmentTree/QueryProduct.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L69_SegmentTree/QueryProduct.class
--------------------------------------------------------------------------------
/bin/L69_SegmentTree/QuerySum.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L69_SegmentTree/QuerySum.class
--------------------------------------------------------------------------------
/bin/L69_SegmentTree/STI.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L69_SegmentTree/STI.class
--------------------------------------------------------------------------------
/bin/L69_SegmentTree/SegmentTree$Node.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L69_SegmentTree/SegmentTree$Node.class
--------------------------------------------------------------------------------
/bin/L69_SegmentTree/SegmentTree.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L69_SegmentTree/SegmentTree.class
--------------------------------------------------------------------------------
/bin/L6_Functions/Armstrong.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L6_Functions/Armstrong.class
--------------------------------------------------------------------------------
/bin/L6_Functions/FunctionDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L6_Functions/FunctionDemo.class
--------------------------------------------------------------------------------
/bin/L6_Functions/ShoppingGame.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L6_Functions/ShoppingGame.class
--------------------------------------------------------------------------------
/bin/L71_Huffman/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L71_Huffman/Client.class
--------------------------------------------------------------------------------
/bin/L71_Huffman/Huffman$Node.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L71_Huffman/Huffman$Node.class
--------------------------------------------------------------------------------
/bin/L71_Huffman/Huffman.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L71_Huffman/Huffman.class
--------------------------------------------------------------------------------
/bin/L71_Trie/Client.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L71_Trie/Client.class
--------------------------------------------------------------------------------
/bin/L71_Trie/Trie$Node.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L71_Trie/Trie$Node.class
--------------------------------------------------------------------------------
/bin/L71_Trie/Trie.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L71_Trie/Trie.class
--------------------------------------------------------------------------------
/bin/L72_Abstract/DataStructure.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L72_Abstract/DataStructure.class
--------------------------------------------------------------------------------
/bin/L72_Abstract/Stack.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L72_Abstract/Stack.class
--------------------------------------------------------------------------------
/bin/L72_NagarroTest/JobScheduling$PP.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L72_NagarroTest/JobScheduling$PP.class
--------------------------------------------------------------------------------
/bin/L72_NagarroTest/JobScheduling.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L72_NagarroTest/JobScheduling.class
--------------------------------------------------------------------------------
/bin/L72_NagarroTest/NeedForSpeed.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L72_NagarroTest/NeedForSpeed.class
--------------------------------------------------------------------------------
/bin/L7_Array/ArrayDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L7_Array/ArrayDemo.class
--------------------------------------------------------------------------------
/bin/L7_Array/ArrayOps.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L7_Array/ArrayOps.class
--------------------------------------------------------------------------------
/bin/L7_Array/PairOfRoses.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coding-blocks-archives/JavaNagarroBootcampJan21/82092136c68a61d5bd7d9b7eacc31d24c84833eb/bin/L7_Array/PairOfRoses.class
--------------------------------------------------------------------------------
/src/DP/LISNnlogn.java:
--------------------------------------------------------------------------------
1 | package DP;
2 |
3 | /**
4 | * @author Garima Chhikara
5 | * @email garima.chhikara@codingblocks.com
6 | *
7 | */
8 |
9 | public class LISNnlogn {
10 |
11 | public static void main(String[] args) {
12 |
13 | int[] arr = { 0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15 };
14 | System.out.println(LISBU(arr));
15 | }
16 |
17 | public static int LISBU(int[] arr) {
18 |
19 | int[] le = new int[arr.length];
20 |
21 | le[0] = arr[0];
22 | int len = 1;
23 |
24 | for (int i = 1; i < arr.length; i++) {
25 |
26 | if (arr[i] > le[len - 1]) {
27 | le[len] = arr[i];
28 | len++;
29 | } else {
30 |
31 | int idx = binarySearch(le, 0, len - 1, arr[i]);
32 | le[idx] = arr[i];
33 | }
34 |
35 | }
36 |
37 | return len;
38 |
39 | }
40 |
41 | public static int binarySearch(int[] le, int si, int ei, int item) {
42 |
43 | int low = si;
44 | int high = ei;
45 |
46 | while (low <= high) {
47 |
48 | int mid = (low + high) / 2;
49 | if (item > le[mid]) {
50 | low = mid + 1;
51 | } else {
52 | high = mid - 1;
53 | }
54 |
55 | }
56 |
57 | return low;
58 |
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/src/DP/LISn2.java:
--------------------------------------------------------------------------------
1 | package DP;
2 |
3 | import java.util.Arrays;
4 |
5 | /**
6 | * @author Garima Chhikara
7 | * @email garima.chhikara@codingblocks.com
8 | *
9 | */
10 |
11 | public class LISn2 {
12 |
13 | public static void main(String[] args) {
14 |
15 | int[] arr = { 3, 4, -1, 0, 6, 2, 3 };
16 | System.out.println(LISBU(arr));
17 | }
18 |
19 | public static int LISBU(int[] arr) {
20 |
21 | int max = Integer.MIN_VALUE;
22 |
23 | int[] strg = new int[arr.length];
24 |
25 | Arrays.fill(strg, 1);
26 |
27 | for (int i = 0; i < strg.length; i++) {
28 |
29 | for (int j = 0; j < i; j++) {
30 |
31 | if (arr[j] < arr[i]) {
32 | strg[i] = Math.max(strg[i], strg[j] + 1);
33 |
34 | max = Math.max(max, strg[i]);
35 | }
36 | }
37 | }
38 |
39 | return max;
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/L13_TimeComplexity/TimeComplexityOps.java:
--------------------------------------------------------------------------------
1 | package L13_TimeComplexity;
2 |
3 | import java.util.Arrays;
4 |
5 | public class TimeComplexityOps {
6 |
7 | public static void main(String[] args) {
8 |
9 | //System.out.println(polynomial(3, 7));
10 | SOE(50) ;
11 | }
12 |
13 | public static int polynomial(int x, int n) {
14 |
15 | int sum = 0;
16 | int mult = x;
17 |
18 | for (int coeff = n; coeff >= 1; coeff--) {
19 |
20 | sum += coeff * mult;
21 | mult = mult * x;
22 | }
23 |
24 | return sum;
25 | }
26 |
27 | public static void SOE(int n) {
28 |
29 | boolean[] primes = new boolean[n + 1];
30 |
31 | Arrays.fill(primes, true);
32 |
33 | primes[0] = false;
34 | primes[1] = false;
35 |
36 | for (int table = 2; table * table <= n; table++) {
37 |
38 | if(primes[table] == false)
39 | continue ;
40 |
41 | for (int mult = 2; table * mult <= n; mult++) {
42 | primes[table * mult] = false;
43 | }
44 |
45 | }
46 |
47 | for (int i = 0; i < primes.length; i++) {
48 | if(primes[i])
49 | System.out.println(i);
50 | }
51 |
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/src/L13_TimeComplexity/TimeSpaceDemo.java:
--------------------------------------------------------------------------------
1 | package L13_TimeComplexity;
2 |
3 | public class TimeSpaceDemo {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 100000;
8 |
9 | for (int i = 1; i <= n; i++)
10 | System.out.println("hello");
11 |
12 | for (int i = 1; i <= n; i++)
13 | for (int j = 1; j <= n; j++)
14 | System.out.println("hello");
15 |
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/L16_Strings/Demo.java:
--------------------------------------------------------------------------------
1 | package L16_Strings;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Demo {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in);
10 |
11 | System.out.println("hii");
12 |
13 | int n = scn.nextInt() ;
14 | System.out.println(n);
15 |
16 | String str = scn.next() ;
17 | System.out.println(str);
18 |
19 | System.out.println("bye");
20 |
21 |
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/L1_Basics/ConditionalDemo.java:
--------------------------------------------------------------------------------
1 | package L1_Basics;
2 |
3 | public class ConditionalDemo {
4 |
5 | public static void main(String[] args) {
6 |
7 | System.out.println("Hii");
8 |
9 | int marks = 80;
10 |
11 | if(marks >= 90)
12 | System.out.println("Excellent");
13 |
14 | else if(marks > 70)
15 | System.out.println("very good");
16 |
17 | else if(marks > 50)
18 | System.out.println("average");
19 |
20 | else
21 | System.out.println("bad");
22 |
23 | System.out.println("Bye");
24 |
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/src/L1_Basics/EvenOdd.java:
--------------------------------------------------------------------------------
1 | package L1_Basics;
2 |
3 | import java.util.Scanner;
4 |
5 | public class EvenOdd {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in) ;
10 |
11 | int n = scn.nextInt() ;
12 |
13 | if (n % 2 == 0) {
14 | System.out.println(n + " is even");
15 | } else {
16 | System.out.println(n + " is odd");
17 | }
18 |
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/L1_Basics/LoopDemo.java:
--------------------------------------------------------------------------------
1 | package L1_Basics;
2 |
3 | public class LoopDemo {
4 |
5 | public static void main(String[] args) {
6 |
7 | System.out.println("hii");
8 |
9 | int count = 1 ;
10 |
11 | while(count <= 3)
12 | {
13 | System.out.println("hello");
14 |
15 | count = count + 1 ;
16 | }
17 |
18 | System.out.println("bye " + count);
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/L1_Basics/Prime.java:
--------------------------------------------------------------------------------
1 | package L1_Basics;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Prime {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in);
10 | int n = scn.nextInt();
11 |
12 | int fact = 0 ;
13 |
14 | int div = 1 ;
15 | while(div <= n) {
16 |
17 | if(n % div == 0) {
18 | fact = fact + 1 ;
19 | }
20 |
21 | div = div + 1 ;
22 | }
23 |
24 | if(fact == 2)
25 | System.out.println(n + " is prime");
26 | else
27 | System.out.println(n + " is not prime");
28 |
29 |
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/L1_Basics/Prime2.java:
--------------------------------------------------------------------------------
1 | package L1_Basics;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Prime2 {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in);
10 | int n = scn.nextInt();
11 |
12 | int fact = 0 ;
13 |
14 | int div = 2 ;
15 | while(div * div <= n) {
16 |
17 | if(n % div == 0) {
18 | fact = fact + 1 ;
19 | break ;
20 | }
21 |
22 | div = div + 1 ;
23 | }
24 |
25 | if(fact == 0)
26 | System.out.println("Prime");
27 | else
28 | System.out.println("Not Prime");
29 |
30 |
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/L1_Basics/SumN.java:
--------------------------------------------------------------------------------
1 | package L1_Basics;
2 |
3 | import java.util.Scanner;
4 |
5 | public class SumN {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in);
10 | int n = scn.nextInt();
11 |
12 | int sum = 0;
13 |
14 | int count = 1;
15 |
16 | while (count <= n) {
17 |
18 | sum = sum + count;
19 | count = count + 1;
20 | }
21 |
22 | System.out.println(sum);
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/L1_Basics/Test.java:
--------------------------------------------------------------------------------
1 | package L1_Basics;
2 |
3 | public class Test {
4 |
5 | public static void main(String[] args) {
6 |
7 | System.out.println("hello world");
8 | System.out.println("hello world");
9 |
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/src/L1_Basics/VariableDemo.java:
--------------------------------------------------------------------------------
1 | package L1_Basics;
2 |
3 | public class VariableDemo {
4 |
5 | public static void main(String[] args) {
6 |
7 | int p = 1000 ;
8 | int r = 6 ;
9 | int t = 2 ;
10 |
11 | int si = (p * r * t) / 100 ;
12 |
13 | System.out.println("Simple Interest is " + si);
14 |
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/L23_Leetcode/CoinChangeCase2CoinRespect.java:
--------------------------------------------------------------------------------
1 | package L23_Leetcode;
2 |
3 | public class CoinChangeCase2CoinRespect {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[] denom = { 1, 2, 3 };
8 | coinRespect(denom, 0, 3, "");
9 |
10 | }
11 |
12 | public static void coinRespect(int[] denom, int vidx, int amt, String ans) {
13 |
14 | if (amt == 0) {
15 | System.out.println(ans);
16 | return;
17 | }
18 |
19 | if (vidx == denom.length || amt < 0) {
20 | return;
21 | }
22 |
23 | coinRespect(denom, vidx + 1, amt - denom[vidx], ans + denom[vidx]);
24 | coinRespect(denom, vidx + 1, amt, ans);
25 |
26 | }
27 | }
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/L23_Leetcode/CoinChangeCase2UserRespect.java:
--------------------------------------------------------------------------------
1 | package L23_Leetcode;
2 |
3 | public class CoinChangeCase2UserRespect {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[] denom = {2,2,2,3,4} ;
8 | userRespect(denom, 0, 6, "");
9 |
10 | }
11 |
12 | public static void userRespect(int[] denom, int vidx, int amt, String ans) {
13 |
14 | if (amt == 0) {
15 | System.out.println(ans);
16 | return;
17 | }
18 |
19 | if (amt < 0) {
20 | return;
21 | }
22 |
23 | for (int i = vidx; i < denom.length; i++) {
24 | userRespect(denom, i+1, amt - denom[i], ans + denom[i]);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/L23_Leetcode/SubsetCase1ElementRespect.java:
--------------------------------------------------------------------------------
1 | package L23_Leetcode;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | public class SubsetCase1ElementRespect {
7 |
8 | public static void main(String[] args) {
9 |
10 | int[] arr = { 1, 2, 3 };
11 |
12 | List> list = new ArrayList<>() ;
13 |
14 | elementRespect(arr, 0, new ArrayList<>(), list);
15 |
16 | System.out.println(list);
17 |
18 | }
19 |
20 | public static void elementRespect(int[] arr, int vidx, String ans) {
21 |
22 | if (vidx == arr.length) {
23 | System.out.println(ans);
24 | return;
25 | }
26 |
27 | elementRespect(arr, vidx + 1, ans + arr[vidx]); // Yes
28 | elementRespect(arr, vidx + 1, ans); // No
29 |
30 | }
31 |
32 | public static void elementRespect(int[] arr, int vidx, List temp, List> list) {
33 |
34 | if (vidx == arr.length) {
35 | list.add(new ArrayList<>(temp)) ;
36 | return;
37 | }
38 |
39 | temp.add(arr[vidx]) ;
40 | elementRespect(arr, vidx + 1, temp, list); // Yes
41 | temp.remove(temp.size()-1) ;
42 |
43 | elementRespect(arr, vidx + 1, temp, list); // No
44 |
45 | }
46 |
47 | }
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/src/L23_Leetcode/SubsetCase1UserRespect.java:
--------------------------------------------------------------------------------
1 | package L23_Leetcode;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | public class SubsetCase1UserRespect {
7 |
8 | public static void main(String[] args) {
9 |
10 | int[] arr = { 1, 2, 3 };
11 |
12 | List> list = new ArrayList<>();
13 |
14 | userRespect(arr, 0, new ArrayList<>(), list);
15 |
16 | System.out.println(list);
17 |
18 | }
19 |
20 | public static void userRespect(int[] arr, int vidx, String ans) {
21 |
22 | System.out.println(ans);
23 |
24 | for (int i = vidx; i < arr.length; i++) {
25 | userRespect(arr, i + 1, ans + arr[i]);
26 | }
27 |
28 | }
29 |
30 | public static void userRespect(int[] arr, int vidx, List temp, List> list) {
31 |
32 | list.add(new ArrayList<>(temp));
33 |
34 | for (int i = vidx; i < arr.length; i++) {
35 | temp.add(arr[i]);
36 | userRespect(arr, i + 1, temp, list);
37 | temp.remove(temp.size() - 1);
38 | }
39 |
40 | }
41 |
42 | }
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/src/L23_Leetcode/SubsetCase2UserRespect.java:
--------------------------------------------------------------------------------
1 | package L23_Leetcode;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Arrays;
5 | import java.util.List;
6 |
7 | public class SubsetCase2UserRespect {
8 |
9 | public static void main(String[] args) {
10 |
11 | int[] arr = { 1,2,2};
12 |
13 | Arrays.sort(arr);
14 | List> list = new ArrayList<>();
15 |
16 | userRespect(arr, 0, new ArrayList<>(), list);
17 |
18 | System.out.println(list);
19 |
20 | }
21 |
22 | public static void userRespect(int[] arr, int vidx, String ans) {
23 |
24 | System.out.println(ans);
25 |
26 | for (int i = vidx; i < arr.length; i++) {
27 |
28 | if (i > vidx && arr[i] == arr[i - 1])
29 | continue;
30 |
31 | userRespect(arr, i + 1, ans + arr[i]);
32 | }
33 |
34 | }
35 |
36 | public static void userRespect(int[] arr, int vidx, List temp, List> list) {
37 |
38 | list.add(new ArrayList<>(temp));
39 |
40 | for (int i = vidx; i < arr.length; i++) {
41 |
42 | if (i > vidx && arr[i] == arr[i - 1])
43 | continue;
44 |
45 | temp.add(arr[i]);
46 | userRespect(arr, i + 1, temp, list);
47 | temp.remove(temp.size() - 1);
48 | }
49 |
50 | }
51 |
52 | }
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/src/L23_Leetcode/_1079_LetterTilePossibilities.java:
--------------------------------------------------------------------------------
1 | package L23_Leetcode;
2 |
3 | public class _1079_LetterTilePossibilities {
4 |
5 | public static void main(String[] args) {
6 |
7 | System.out.println(numTilePossibilities("AAB"));
8 | }
9 |
10 | static int count;
11 |
12 | public static int numTilePossibilities(String tiles) {
13 |
14 | int[] freq = new int[26];
15 |
16 | for (int i = 0; i < tiles.length(); i++) {
17 |
18 | char ch = tiles.charAt(i);
19 | freq[ch - 'A']++;
20 | }
21 |
22 | count = 0;
23 |
24 | numTile(freq, "");
25 |
26 | return count - 1;
27 |
28 | }
29 |
30 | public static void numTile(int[] freq, String ans) {
31 |
32 | if (ans.length() != 0)
33 | System.out.println(ans);
34 |
35 | count++;
36 |
37 | for (int i = 0; i < freq.length; i++) {
38 |
39 | if (freq[i] > 0) {
40 |
41 | freq[i]--;
42 | numTile(freq, ans + (char) (i + 'A'));
43 | freq[i]++;
44 | }
45 |
46 | }
47 |
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/src/L23_Leetcode/_1291_SequentialDigits.java:
--------------------------------------------------------------------------------
1 | package L23_Leetcode;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Collections;
5 | import java.util.List;
6 |
7 | public class _1291_SequentialDigits {
8 |
9 | public static void main(String[] args) {
10 |
11 | System.out.println(sequentialDigits(1000, 13000));
12 | }
13 |
14 | public static List sequentialDigits(int low, int high) {
15 |
16 | List list = new ArrayList<>() ;
17 |
18 | for(int i = 1 ; i <= 9 ; i++)
19 | sequentialDigits(i, low, high, list);
20 |
21 | Collections.sort(list);
22 | return list ;
23 |
24 | }
25 |
26 | public static void sequentialDigits(int curr, int low, int high, List list) {
27 |
28 | if(curr > high)
29 | return ;
30 |
31 | if(curr >= low && curr <= high) {
32 | list.add(curr) ;
33 | }
34 |
35 | int ld = curr % 10;
36 |
37 | if (ld != 9)
38 | sequentialDigits(curr * 10 + (ld + 1), low, high, list);
39 |
40 | }
41 |
42 | }
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/L23_Leetcode/_46_Permutations.java:
--------------------------------------------------------------------------------
1 | package L23_Leetcode;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Arrays;
5 | import java.util.List;
6 |
7 | public class _46_Permutations {
8 |
9 | public static void main(String[] args) {
10 |
11 | int[] arr = {1,2,3} ;
12 |
13 | System.out.println(permute(arr));
14 | }
15 |
16 | public static List> permute(int[] arr) {
17 |
18 | boolean[] available = new boolean[arr.length] ;
19 | Arrays.fill(available, true);
20 |
21 | List> list = new ArrayList<>() ;
22 |
23 | permutation(arr, available, new ArrayList<>(), list);
24 |
25 | return list ;
26 |
27 |
28 | }
29 |
30 | public static void permutation(int[] arr, boolean[] available, List temp, List> list) {
31 |
32 | if(temp.size() ==arr.length) {
33 | list.add(new ArrayList<>(temp)) ;
34 | return ;
35 | }
36 |
37 | for (int i = 0; i < available.length; i++) {
38 |
39 | if(available[i] == false)
40 | continue ;
41 |
42 | available[i] = false ;
43 | temp.add(arr[i]) ;
44 |
45 | permutation(arr, available, temp, list);
46 |
47 | temp.remove(temp.size()-1) ;
48 | available[i] = true ;
49 |
50 |
51 | }
52 |
53 |
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/src/L23_Leetcode/_60_PermutationSequence.java:
--------------------------------------------------------------------------------
1 | package L23_Leetcode;
2 |
3 | import java.util.ArrayList;
4 |
5 | public class _60_PermutationSequence {
6 |
7 | public static void main(String[] args) {
8 |
9 | System.out.println(getPermutation(4, 17));
10 | }
11 |
12 | public static String getPermutation(int n, int k) {
13 |
14 | int[] fact = new int[n];
15 | fact[0] = 1;
16 | for (int i = 1; i < fact.length; i++) {
17 | fact[i] = fact[i - 1] * i;
18 | }
19 |
20 | ArrayList list = new ArrayList<>();
21 | for (int i = 0; i <= n; i++)
22 | list.add(i);
23 |
24 | return permutation(n, k, fact, list, "");
25 | }
26 |
27 | public static String permutation(int n, int k, int[] fact, ArrayList list , String ans) {
28 |
29 | if(n == 0) {
30 | return ans ;
31 | }
32 |
33 | int group = k / fact[n - 1];
34 |
35 | if (k % fact[n - 1] != 0)
36 | group++;
37 |
38 | int newk = k - (group - 1) * fact[n - 1];
39 |
40 | int val = list.remove(group) ;
41 |
42 | return permutation(n - 1, newk, fact, list , ans+val);
43 |
44 | }
45 |
46 | }
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/src/L2_Loops/Fibonacci.java:
--------------------------------------------------------------------------------
1 | package L2_Loops;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Fibonacci {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in);
10 |
11 | int n = scn.nextInt();
12 |
13 | int a = 0;
14 | int b = 1;
15 |
16 | int count = 1;
17 | while (count <= n + 1) {
18 |
19 | System.out.println(a);
20 |
21 | int sum = a + b;
22 |
23 | // update
24 | a = b;
25 | b = sum;
26 |
27 | count++;
28 | }
29 |
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/L2_Loops/HCF.java:
--------------------------------------------------------------------------------
1 | package L2_Loops;
2 |
3 | import java.util.Scanner;
4 |
5 | public class HCF {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in) ;
10 |
11 | int n1 = scn.nextInt() ;
12 | int n2 = scn.nextInt() ;
13 |
14 | int min = Math.min(n1, n2) ;
15 |
16 | int count = min ;
17 | while(count >= 1) {
18 |
19 | if(n1 % count == 0 && n2 % count == 0){
20 | System.out.println(count);
21 | break ;
22 | }
23 |
24 | count = count - 1 ;
25 | }
26 |
27 |
28 |
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/L2_Loops/HCF2.java:
--------------------------------------------------------------------------------
1 | package L2_Loops;
2 |
3 | import java.util.Scanner;
4 |
5 | public class HCF2 {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in) ;
10 |
11 | int n1 = scn.nextInt() ;
12 | int n2 = scn.nextInt() ;
13 |
14 | int min = Math.min(n1, n2) ;
15 |
16 | int hcf = 1;
17 |
18 | int count = 1 ;
19 | while(count <= min) {
20 |
21 | if(n1 % count == 0 && n2 % count == 0){
22 | hcf = count ;
23 | }
24 |
25 | count = count + 1 ;
26 | }
27 |
28 | System.out.println(hcf);
29 |
30 |
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/L2_Loops/HCF3.java:
--------------------------------------------------------------------------------
1 | package L2_Loops;
2 |
3 | import java.util.Scanner;
4 |
5 | public class HCF3 {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in);
10 |
11 | int divident = scn.nextInt();
12 | int divisor = scn.nextInt();
13 |
14 | while(true) {
15 |
16 | int rem = divident % divisor ;
17 |
18 | if(rem == 0)
19 | break ;
20 |
21 | divident = divisor ;
22 | divisor = rem ;
23 |
24 | }
25 |
26 | System.out.println(divisor);
27 |
28 |
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/L2_Loops/Pattern0.java:
--------------------------------------------------------------------------------
1 | package L2_Loops;
2 |
3 | public class Pattern0 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 3;
8 |
9 | int row = 1;
10 |
11 | while (row <= n) {
12 |
13 | // work
14 | System.out.print("*");
15 |
16 | // changes
17 | System.out.println();
18 | row = row + 1;
19 |
20 | }
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/L2_Loops/Pattern1.java:
--------------------------------------------------------------------------------
1 | package L2_Loops;
2 |
3 | public class Pattern1 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | // rows
10 | int row = 1;
11 |
12 | while (row <= n) {
13 |
14 | // work
15 | for (int col = 1; col <= n; col = col + 1)
16 | System.out.print("*");
17 |
18 | // changes
19 | System.out.println();
20 | row = row + 1;
21 |
22 | }
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/L2_Loops/Reverse.java:
--------------------------------------------------------------------------------
1 | package L2_Loops;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Reverse {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in);
10 |
11 | int n = scn.nextInt();
12 |
13 | int ans = 0 ;
14 |
15 | while (n > 0) {
16 |
17 | int rem = n % 10;
18 | ans = ans * 10 + rem ;
19 | n = n / 10;
20 |
21 | }
22 |
23 | System.out.println(ans);
24 |
25 |
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/L33_OOPS/Student.java:
--------------------------------------------------------------------------------
1 | package L33_OOPS;
2 |
3 | public class Student {
4 |
5 | String name;
6 | int age;
7 |
8 | public void introduceYourself() {
9 | System.out.println(name + " is " + age + " years old.");
10 | }
11 |
12 | public void sayHi(String name, Student s) {
13 | System.out.println(this.name + " says hi to " + name);
14 | introduceYourself();
15 | }
16 |
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/L34_OOPS/Client.java:
--------------------------------------------------------------------------------
1 | package L34_OOPS;
2 |
3 | public class Client {
4 |
5 | public static void main(String[] args) {
6 |
7 | Student s = new Student("Kamal", 25);
8 | s.introduceYourself();
9 |
10 | Student s1 = new Student() ;
11 | s1.introduceYourself();
12 |
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/L34_OOPS/Codechef.java:
--------------------------------------------------------------------------------
1 | package L34_OOPS;
2 |
3 | import java.util.Scanner;
4 |
5 | // https://www.codechef.com/problems/BUILDB
6 |
7 | public class Codechef {
8 |
9 | public static void main(String[] args) {
10 |
11 | Scanner scn = new Scanner(System.in);
12 |
13 | int tc = scn.nextInt();
14 |
15 | for (int i = 0; i < tc; i++) {
16 |
17 | int n = scn.nextInt();
18 |
19 | int r = scn.nextInt();
20 |
21 | int[] A = new int[n];
22 | int[] B = new int[n];
23 |
24 | for (int j = 0; j < n; j++) {
25 | A[j] = scn.nextInt();
26 | }
27 |
28 | for (int j = 0; j < n; j++) {
29 | B[j] = scn.nextInt();
30 | }
31 |
32 | long max = B[0];
33 | long tension = B[0];
34 |
35 | for (int k = 1; k < n; k++) {
36 |
37 | tension -= (A[k] - A[k - 1]) * r;
38 |
39 | if (tension < 0) {
40 | tension = 0;
41 | }
42 |
43 | tension += B[k];
44 |
45 | if (tension > max) {
46 | max = tension;
47 | }
48 | }
49 |
50 | System.out.println(max);
51 | }
52 |
53 | scn.close();
54 |
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/src/L34_OOPS/PClient.java:
--------------------------------------------------------------------------------
1 | package L34_OOPS;
2 |
3 | public class PClient {
4 |
5 | public static void main(String[] args) {
6 |
7 | System.out.println("hello");
8 |
9 | try {
10 | Person p = new Person();
11 | p.setAge(-20);
12 | System.out.println(p.getAge());
13 | return;
14 | } catch (Exception e) {
15 | // System.out.println("in catch");
16 | e.printStackTrace();
17 | // System.out.println(e.getMessage());
18 | } finally {
19 | System.out.println("in finally");
20 | }
21 |
22 | System.out.println("bye");
23 |
24 | // case 3
25 | // System.out.println("hello");
26 | //
27 | // Person p = new Person();
28 | // p.setAge(-20);
29 | // System.out.println(p.getAge());
30 | //
31 | // System.out.println("bye");
32 |
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/L34_OOPS/Person.java:
--------------------------------------------------------------------------------
1 | package L34_OOPS;
2 |
3 | public class Person {
4 |
5 | private String name;
6 | private int age;
7 |
8 | public int getAge() {
9 | return age;
10 | }
11 |
12 | public void setAge(int age) throws Exception {
13 |
14 | if (age < 0) {
15 | throw new Exception("Age can't be -ve");
16 | }
17 | this.age = age;
18 |
19 | // case 3
20 | // try {
21 | // if (age < 0) {
22 | // throw new Exception("Age can't be -ve");
23 | // }
24 | // this.age = age;
25 | //
26 | // }
27 | // catch (Exception e) {
28 | // // System.out.println(e.getMessage()) ;
29 | // System.out.println("in catch");
30 | // }
31 | //
32 | // System.out.println("bye set age");
33 |
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/L34_OOPS/Person2.java:
--------------------------------------------------------------------------------
1 | package L34_OOPS;
2 |
3 | public class Person2 {
4 |
5 | private String name;
6 | private int age;
7 |
8 | public int getAge() {
9 | return age;
10 | }
11 |
12 | public void setAge(int age) {
13 |
14 | if (age < 0) {
15 | throw new RuntimeException("Age can't be -ve");
16 | }
17 | this.age = age;
18 |
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/L34_OOPS/Student.java:
--------------------------------------------------------------------------------
1 | package L34_OOPS;
2 |
3 | public class Student {
4 |
5 | String name = "Rohit";
6 | int age = 50;
7 |
8 | public Student() {
9 | this.name = "Aman";
10 | this.age = 20;
11 | }
12 |
13 | public Student(String name, int age) {
14 | this.name = name;
15 | this.age = age;
16 | }
17 |
18 | public void introduceYourself() {
19 | System.out.println(name + " is " + age + " years old.");
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/L34_Stack/SClient.java:
--------------------------------------------------------------------------------
1 | package L34_Stack;
2 |
3 | public class SClient {
4 |
5 | public static void main(String[] args) throws Exception{
6 |
7 | Stack s = new Stack(3) ;
8 |
9 | s.push(10);
10 | s.push(20);
11 | s.push(30);
12 |
13 | s.display();
14 |
15 | System.out.println(s.peek());
16 | System.out.println(s.pop());
17 | System.out.println(s.pop());
18 | System.out.println(s.pop());
19 | // System.out.println(s.pop());
20 |
21 | s.display();
22 | s.push(50);
23 | s.display();
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/src/L35_Queue/QClient.java:
--------------------------------------------------------------------------------
1 | package L35_Queue;
2 |
3 | public class QClient {
4 |
5 | public static void main(String[] args) throws Exception {
6 |
7 | Queue q = new Queue();
8 |
9 | q.enqueue(10);
10 | q.enqueue(20);
11 | q.enqueue(30);
12 | q.enqueue(40);
13 | q.enqueue(50);
14 |
15 | q.display();
16 |
17 | System.out.println(q.dequeue());
18 | System.out.println(q.dequeue());
19 |
20 | q.display();
21 |
22 | q.enqueue(60);
23 | q.enqueue(70);
24 |
25 | q.display();
26 | // q.enqueue(80);
27 |
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/L36_Inheritance/C.java:
--------------------------------------------------------------------------------
1 | package L36_Inheritance;
2 |
3 | public class C extends P{
4 |
5 | int d = 20 ;
6 | int d2 = 200 ;
7 |
8 | public void fun() {
9 | System.out.println("in C's Fun");
10 | }
11 |
12 | public void fun2() {
13 | System.out.println("in C's Fun 2");
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/src/L36_Inheritance/Client.java:
--------------------------------------------------------------------------------
1 | package L36_Inheritance;
2 |
3 | public class Client {
4 |
5 | public static void main(String[] args) {
6 |
7 | // Case 1
8 | P obj1 = new P();
9 | System.out.println(obj1.d); // 10
10 | System.out.println(obj1.d1); // 100
11 | obj1.fun(); // P's fun
12 | obj1.fun1(); // P's fun1
13 |
14 | // Case 2
15 | P obj2 = new C();
16 | System.out.println(obj2.d); // 10
17 | System.out.println(((C) obj2).d); // 20
18 | System.out.println(obj2.d1); // 100
19 | System.out.println(((C) obj2).d2); // 200
20 | obj2.fun(); // C's fun
21 | ((P) obj2).fun(); // C's fun
22 | obj2.fun1(); // P's fun1
23 | ((C)obj2).fun2(); // C's fun 2
24 |
25 | // Case 3
26 | // C obj3 = new P() ;
27 |
28 | // Case 4
29 | C obj4 = new C() ;
30 | System.out.println(obj4.d); // 20
31 | System.out.println(((P)obj4).d); // 10
32 | System.out.println(obj4.d1); // 100
33 | System.out.println(obj4.d2); // 200
34 | obj4.fun(); // C's fun
35 | ((P)obj4).fun(); // C's fun
36 | obj4.fun1(); // P's fun 1
37 | obj4.fun2(); // C's fun 2
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/src/L36_Inheritance/P.java:
--------------------------------------------------------------------------------
1 | package L36_Inheritance;
2 |
3 | public class P {
4 |
5 | int d = 10;
6 | int d1 = 100;
7 |
8 | public void fun() {
9 | System.out.println("in P's Fun");
10 | }
11 |
12 | public void fun1() {
13 | System.out.println("in P's Fun 1");
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/L36_Inheritance/SClient.java:
--------------------------------------------------------------------------------
1 | package L36_Inheritance;
2 |
3 | import java.util.ArrayList;
4 |
5 | public class SClient {
6 |
7 | public static void main(String[] args) {
8 |
9 | Student s = new Student() ;
10 | System.out.println(s);
11 |
12 | ArrayList list = new ArrayList() ;
13 | list.add(10) ;
14 | list.add(20) ;
15 |
16 | System.out.println(list);
17 |
18 | char a = 10 ;
19 | System.out.println(a);
20 |
21 |
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/L36_Inheritance/Student.java:
--------------------------------------------------------------------------------
1 | package L36_Inheritance;
2 |
3 | public class Student {
4 |
5 | String name ;
6 | int age ;
7 |
8 | @Override
9 | public String toString() {
10 | return name + " is " + age + " years old." ;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/L37_DynamicStackQueue/DQClient.java:
--------------------------------------------------------------------------------
1 | package L37_DynamicStackQueue;
2 |
3 | public class DQClient {
4 |
5 | public static void main(String[] args) throws Exception {
6 |
7 | DynamicQueue dq = new DynamicQueue() ;
8 | dq.enqueue(10) ;
9 | dq.enqueue(20) ;
10 | dq.enqueue(30) ;
11 | dq.enqueue(40) ;
12 | dq.enqueue(50) ;
13 | dq.dequeue() ;
14 | dq.dequeue() ;
15 | dq.enqueue(60) ;
16 | dq.enqueue(70) ;
17 |
18 | dq.enqueue(80);
19 | dq.enqueue(90);
20 |
21 | dq.display();
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/L37_DynamicStackQueue/DSClient.java:
--------------------------------------------------------------------------------
1 | package L37_DynamicStackQueue;
2 |
3 | import L34_Stack.Stack;
4 |
5 | public class DSClient {
6 |
7 | public static void main(String[] args) throws Exception {
8 |
9 | DynamicStack ds = new DynamicStack();
10 |
11 | while (true) {
12 | ds.push(10);
13 | ds.push(20);
14 | ds.push(30);
15 | ds.push(40);
16 | ds.push(50);
17 | // ds.display();
18 | ds.push(60);
19 | ds.push(70);
20 | ds.push(80);
21 | // ds.display();
22 | }
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/L37_DynamicStackQueue/DynamicQueue.java:
--------------------------------------------------------------------------------
1 | package L37_DynamicStackQueue;
2 |
3 | import L35_Queue.Queue;
4 |
5 | public class DynamicQueue extends Queue{
6 |
7 | @Override
8 | public void enqueue(int item) throws Exception {
9 |
10 | if(isFull()) {
11 |
12 | // create a new array
13 | int[] na = new int[data.length*2] ;
14 |
15 | // copy the values
16 | for (int i = 0; i < size; i++) {
17 |
18 | int idx = (i + front) % data.length;
19 | na[i] = data[idx] ;
20 | }
21 |
22 | // ref change
23 | data = na ;
24 | front = 0 ;
25 | }
26 |
27 | super.enqueue(item);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/L37_DynamicStackQueue/DynamicStack.java:
--------------------------------------------------------------------------------
1 | package L37_DynamicStackQueue;
2 |
3 | import L34_Stack.Stack;
4 |
5 | public class DynamicStack extends Stack{
6 |
7 | @Override
8 | public void push(int item) throws Exception {
9 |
10 | if(isFull()) {
11 |
12 | // create a new array of double size
13 | int[] na = new int[data.length * 2] ;
14 |
15 | // copy the old values
16 | for(int i = tos ; i >=0 ; i--) {
17 | na[i] = data[i] ;
18 | }
19 |
20 | // ref change
21 | data = na ;
22 |
23 | }
24 |
25 | super.push(item);
26 |
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/L38_MinStack/Client.java:
--------------------------------------------------------------------------------
1 | package L38_MinStack;
2 |
3 | public class Client {
4 |
5 | public static void main(String[] args) throws Exception {
6 |
7 | MinStack s = new MinStack();
8 | s.push(10);
9 | s.push(50);
10 | s.push(40);
11 | s.push(6);
12 | s.push(45);
13 | s.push(2);
14 |
15 | System.out.println(s.peek());
16 | s.pop();
17 | System.out.println(s.peek());
18 |
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/L39_LinkedList/LLClient.java:
--------------------------------------------------------------------------------
1 | package L39_LinkedList;
2 |
3 | public class LLClient {
4 |
5 | public static void main(String[] args) throws Exception {
6 |
7 | LinkedList ll = new LinkedList();
8 | ll.addLast(10);
9 | ll.addLast(20);
10 | ll.addLast(30);
11 | ll.display();
12 |
13 | ll.addLast(40);
14 | // ll.display();
15 | ll.addLast(50);
16 | ll.display();
17 | // ll.addAt(2, 60);
18 | // ll.display();
19 | // System.out.println(ll.getFirst());
20 | // System.out.println(ll.getLast());
21 | // System.out.println(ll.getAt(3));
22 | //
23 | // System.out.println(ll.removeFirst());
24 | // ll.display();
25 | ll.addLast(70);
26 | // ll.display();
27 | // System.out.println(ll.removeLast());
28 | // ll.addFirst(80);
29 | // ll.display();
30 | // System.out.println(ll.removeAt(2));
31 | // ll.display();
32 |
33 | // ll.reverseR2() ;
34 | ll.display();
35 |
36 | System.out.println(ll.mid());
37 | System.out.println(ll.kthFromLast(5));
38 |
39 | ll.createDummyList();
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/src/L3_Patterns/Pattern10.java:
--------------------------------------------------------------------------------
1 | package L3_Patterns;
2 |
3 | public class Pattern10 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = 0 ;
10 | int nst = 2*n-1 ;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // work
16 | // spaces
17 | for (int csp = 1; csp <= nsp; csp = csp + 1)
18 | System.out.print(" ");
19 |
20 | // stars
21 | for (int cst = 1; cst <= nst; cst = cst + 1)
22 | System.out.print("* ");
23 |
24 | // changes
25 | System.out.println();
26 | row = row + 1;
27 | nsp = nsp + 1;
28 | nst = nst - 2;
29 |
30 | }
31 |
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/L3_Patterns/Pattern11.java:
--------------------------------------------------------------------------------
1 | package L3_Patterns;
2 |
3 | public class Pattern11 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 7;
8 |
9 | int nsp = n-1 ;
10 | int nst = 1 ;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // work
16 | // spaces
17 | for (int csp = 1; csp <= nsp; csp = csp + 1)
18 | System.out.print(" ");
19 |
20 | // stars
21 | for (int cst = 1; cst <= nst; cst = cst + 1) {
22 |
23 | if(cst % 2 == 0)
24 | System.out.print(" ");
25 | else
26 | System.out.print("* ");
27 |
28 | }
29 |
30 | // changes
31 | System.out.println();
32 | row = row + 1;
33 | nsp = nsp - 1;
34 | nst = nst + 2;
35 |
36 | }
37 |
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/L3_Patterns/Pattern12.java:
--------------------------------------------------------------------------------
1 | package L3_Patterns;
2 |
3 | public class Pattern12 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 10;
8 |
9 | int nsp = n-1 ;
10 | int nst = 1 ;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // work
16 | // spaces
17 | for (int csp = 1; csp <= nsp; csp = csp + 1)
18 | System.out.print(" ");
19 |
20 | // stars
21 | for (int cst = 1; cst <= nst; cst = cst + 1) {
22 |
23 | if(cst % 2 == 0)
24 | System.out.print("! ");
25 | else
26 | System.out.print("* ");
27 |
28 | }
29 |
30 | // changes
31 | System.out.println();
32 | row = row + 1;
33 | nsp = nsp - 1;
34 | nst = nst + 2;
35 |
36 | }
37 |
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/L3_Patterns/Pattern2.java:
--------------------------------------------------------------------------------
1 | package L3_Patterns;
2 |
3 | public class Pattern2 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nst = 1;
10 |
11 | int row = 1;
12 | while (row <= n) {
13 |
14 | // work
15 | for (int col = 1; col <= nst; col = col + 1) {
16 | System.out.print("*");
17 | }
18 |
19 |
20 | // changes
21 | System.out.println();
22 | row = row + 1;
23 | nst = nst + 1;
24 |
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/L3_Patterns/Pattern3.java:
--------------------------------------------------------------------------------
1 | package L3_Patterns;
2 |
3 | public class Pattern3 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nst = n;
10 |
11 | int row = 1;
12 | while (row <= n) {
13 |
14 | // work
15 | // cst is nothing spcl, it is simply a variable which is responsible for running the loop
16 | for (int cst = 1; cst <= nst; cst = cst + 1) {
17 | System.out.print("*");
18 | }
19 |
20 | // changes
21 | System.out.println();
22 | row = row + 1;
23 | nst = nst - 1;
24 |
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/L3_Patterns/Pattern4.java:
--------------------------------------------------------------------------------
1 | package L3_Patterns;
2 |
3 | public class Pattern4 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 9;
8 |
9 | int nsp = n - 1;
10 | int nst = 1;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // work
16 | // spaces
17 | for (int csp = 1; csp <= nsp; csp = csp + 1)
18 | System.out.print(" ");
19 |
20 | // stars
21 | for (int cst = 1; cst <= nst; cst = cst + 1)
22 | System.out.print("*");
23 |
24 | // changes
25 | System.out.println();
26 | row = row + 1;
27 | nsp = nsp - 1;
28 | nst = nst + 1;
29 |
30 | }
31 |
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/L3_Patterns/Pattern5.java:
--------------------------------------------------------------------------------
1 | package L3_Patterns;
2 |
3 | public class Pattern5 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = 0 ;
10 | int nst = n ;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // work
16 | // spaces
17 | for (int csp = 1; csp <= nsp; csp = csp + 1)
18 | System.out.print(" ");
19 |
20 | // stars
21 | for (int cst = 1; cst <= nst; cst = cst + 1)
22 | System.out.print("* ");
23 |
24 | // changes
25 | System.out.println();
26 | row = row + 1;
27 | nsp = nsp + 1;
28 | nst = nst - 1;
29 |
30 | }
31 |
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/L3_Patterns/Pattern6.java:
--------------------------------------------------------------------------------
1 | package L3_Patterns;
2 |
3 | public class Pattern6 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = 0 ;
10 | int nst = n ;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // work
16 | // spaces
17 | for (int csp = 1; csp <= nsp; csp = csp + 1)
18 | System.out.print(" ");
19 |
20 | // stars
21 | for (int cst = 1; cst <= nst; cst = cst + 1)
22 | System.out.print("* ");
23 |
24 | // changes
25 | System.out.println();
26 | row = row + 1;
27 | nsp = nsp + 2;
28 | nst = nst - 1;
29 |
30 | }
31 |
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/L3_Patterns/Pattern9.java:
--------------------------------------------------------------------------------
1 | package L3_Patterns;
2 |
3 | public class Pattern9 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = n-1 ;
10 | int nst = 1 ;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // work
16 | // spaces
17 | for (int csp = 1; csp <= nsp; csp = csp + 1)
18 | System.out.print(" ");
19 |
20 | // stars
21 | for (int cst = 1; cst <= nst; cst = cst + 1)
22 | System.out.print("* ");
23 |
24 | // changes
25 | System.out.println();
26 | row = row + 1;
27 | nsp = nsp - 1;
28 | nst = nst + 2;
29 |
30 | }
31 |
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/BinaryToDecimal.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation;
2 |
3 | public class BinaryToDecimal {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 11001;
8 | int mult = 1;
9 |
10 | int sum = 0;
11 |
12 | while (n != 0) {
13 |
14 | int rem = n % 10;
15 | int temp = rem * mult;
16 | sum = sum + temp;
17 |
18 | mult = mult * 2;
19 | n = n / 10;
20 | }
21 |
22 | System.out.println(sum);
23 |
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/BitsPrint.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation;
2 |
3 | public class BitsPrint {
4 |
5 | public static void main(String[] args) {
6 |
7 | // way 1
8 | int x = 100;
9 |
10 | while (x != 0) {
11 |
12 | int rem = x % 2;
13 | System.out.println(rem);
14 |
15 | x = x / 2;
16 | }
17 |
18 | System.out.println("----------");
19 |
20 | // way 2
21 | int y = 100;
22 |
23 | while (y != 0) {
24 |
25 | int rem = y & 1;
26 | System.out.println(rem);
27 |
28 | y = y >> 1;
29 |
30 | }
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/DecimalToBinary.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation;
2 |
3 | public class DecimalToBinary {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 95;
8 | int mult = 1;
9 |
10 | int sum = 0;
11 |
12 | while (n != 0) {
13 |
14 | int rem = n % 2;
15 | int temp = rem * mult;
16 | sum = sum + temp;
17 |
18 | mult = mult * 10;
19 | n = n / 2;
20 | }
21 |
22 | System.out.println(sum);
23 |
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/Demo.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation;
2 |
3 | public class Demo {
4 |
5 | public static void main(String[] args) {
6 |
7 | System.out.println(20 | 40);
8 | System.out.println(36 & 40);
9 | System.out.println(36 ^ 40);
10 |
11 |
12 | byte by = (byte) (-78 >>> 1);
13 |
14 | System.out.println(by);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/DuplicateMissing.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation;
2 |
3 | public class DuplicateMissing {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 6;
8 | int[] arr = { 1, 2, 3, 5, 5, 6 };
9 |
10 | int xor = 0;
11 |
12 | for (int val : arr)
13 | xor ^= val;
14 |
15 | for (int i = 1; i <= n; i++)
16 | xor ^= i;
17 |
18 | int rbsbMask = xor & (-xor);
19 |
20 | int n1 = 0;
21 | int n2 = 0;
22 |
23 | for (int val : arr) {
24 |
25 | // unset
26 | if ((val & rbsbMask) == 0) {
27 | n1 ^= val;
28 | }
29 | // set
30 | else {
31 | n2 ^= val;
32 | }
33 |
34 | }
35 |
36 | for (int val = 1; val <= n; val++) {
37 |
38 | // unset
39 | if ((val & rbsbMask) == 0) {
40 | n1 ^= val;
41 | }
42 | // set
43 | else {
44 | n2 ^= val;
45 | }
46 |
47 | }
48 |
49 | for (int val : arr) {
50 |
51 | if (val == n1) {
52 |
53 | System.out.println("Duplicate No : " + n1);
54 | System.out.println("Missing No : " + n2);
55 | break ;
56 |
57 | } else if (val == n2) {
58 |
59 | System.out.println("Duplicate No : " + n2);
60 | System.out.println("Missing No : " + n1);
61 | break ;
62 |
63 | }
64 |
65 | }
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/GrayCode.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation ;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | public class GrayCode {
7 |
8 | public static void main(String[] args) {
9 |
10 | System.out.println(grayCode(3));
11 |
12 | }
13 |
14 | public static List grayCode(int n) {
15 |
16 | if(n == 1) {
17 | List br = new ArrayList<>();
18 | br.add(0) ;
19 | br.add(1) ;
20 | return br ;
21 | }
22 |
23 | List rr = grayCode(n - 1);
24 |
25 | List mr = new ArrayList<>();
26 |
27 | for (int val : rr) {
28 | mr.add(val);
29 | }
30 |
31 | int mult = (int) Math.pow(2, n - 1);
32 |
33 | for (int i = rr.size() - 1; i >= 0; i--) {
34 | int val = rr.get(i);
35 |
36 | mr.add(mult * val);
37 | }
38 |
39 | return mr;
40 |
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/KernighansAlgo.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation;
2 |
3 | public class KernighansAlgo {
4 |
5 | public static void main(String[] args) {
6 |
7 | int x = 25 ;
8 | System.out.println(Integer.toBinaryString(x));
9 |
10 | int count = 0 ;
11 |
12 | while(x != 0) {
13 |
14 | int rmsbMask = (x & (-x)) ;
15 | x = x - rmsbMask ;
16 | count++ ;
17 |
18 | }
19 |
20 | System.out.println(count);
21 |
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/MagicNo.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation;
2 |
3 | public class MagicNo {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 8;
8 |
9 | int mult = 1; // 5 power 0
10 | int ans = 0;
11 |
12 | while (n != 0) {
13 |
14 | if ((n & 1) == 1)
15 | ans += mult;
16 |
17 | mult = mult * 5;
18 | n = n >> 1;
19 |
20 | }
21 |
22 | System.out.println(ans);
23 |
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/MissingNumber1.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation;
2 |
3 | public class MissingNumber1 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 9 ;
8 | int[] arr = {4,3,1,7,6,2,9,8} ;
9 |
10 | int xor = 0 ;
11 |
12 | for(int val : arr)
13 | xor ^= val ;
14 |
15 | for(int i = 1 ; i <= n ; i++)
16 | xor ^= i ;
17 |
18 | System.out.println(xor);
19 |
20 |
21 |
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/MissingNumber2.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation;
2 |
3 | public class MissingNumber2 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 6;
8 | int[] arr = { 1, 4, 3, 6 };
9 |
10 | int xor = 0;
11 |
12 | for (int val : arr)
13 | xor ^= val;
14 |
15 | for (int i = 1; i <= n; i++)
16 | xor ^= i;
17 |
18 | int rbsbMask = xor & (-xor);
19 |
20 | int n1 = 0;
21 | int n2 = 0;
22 |
23 | for (int val : arr) {
24 |
25 | // unset
26 | if ((val & rbsbMask) == 0) {
27 | n1 ^= val;
28 | }
29 | // set
30 | else {
31 | n2 ^= val;
32 | }
33 |
34 | }
35 |
36 | for (int val = 1 ; val <= n ; val++) {
37 |
38 | // unset
39 | if ((val & rbsbMask) == 0) {
40 | n1 ^= val;
41 | }
42 | // set
43 | else {
44 | n2 ^= val;
45 | }
46 |
47 | }
48 |
49 | System.out.println(n1 + " " + n2);
50 |
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/PowerOf2.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation;
2 |
3 | public class PowerOf2 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 1;
8 |
9 | if (n != 0 && (n & (n - 1)) == 0) {
10 | System.out.println("power of 2");
11 | } else {
12 | System.out.println("not a power of 2");
13 | }
14 |
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/SetBitsCount.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation;
2 |
3 | public class SetBitsCount {
4 |
5 | public static void main(String[] args) {
6 |
7 | int x = 100;
8 |
9 | System.out.println(Integer.toBinaryString(x));
10 |
11 | int count = 0;
12 |
13 | while (x != 0) {
14 |
15 | if ((x & 1) == 1)
16 | count++;
17 |
18 | x >>= 1;
19 |
20 | }
21 |
22 | System.out.println(count);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/UniqueNumber1.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation;
2 |
3 | public class UniqueNumber1 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[] arr = { 20, 10, 67, 89, 10, 20, 89, 56, 67 };
8 |
9 | int ans = 0;
10 |
11 | for (int val : arr) {
12 | ans = ans ^ val;
13 | }
14 |
15 | System.out.println(ans);
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/L42_BitManipulation/UniqueNumber2.java:
--------------------------------------------------------------------------------
1 | package L42_BitManipulation;
2 |
3 | public class UniqueNumber2 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[] arr = {36,50,24,56,36,24,42,50} ;
8 |
9 | int xor = 0 ;
10 |
11 | for(int val : arr)
12 | xor ^= val ;
13 |
14 | int rbsbMask = xor & (-xor) ;
15 |
16 | int n1 = 0 ;
17 | int n2 = 0 ;
18 |
19 | for(int val : arr) {
20 |
21 | // unset
22 | if((val & rbsbMask) == 0) {
23 | n1 ^= val ;
24 | }
25 | // set
26 | else {
27 | n2 ^= val ;
28 | }
29 |
30 | }
31 |
32 | System.out.println(n1 + " " + n2);
33 |
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/L45_AccessSpecifier/P1/P1Class.java:
--------------------------------------------------------------------------------
1 | package L45_AccessSpecifier.P1;
2 |
3 | public class P1Class {
4 |
5 | public int a ;
6 | }
7 |
--------------------------------------------------------------------------------
/src/L45_AccessSpecifier/P1/P1Client.java:
--------------------------------------------------------------------------------
1 | package L45_AccessSpecifier.P1;
2 |
3 | public class P1Client {
4 |
5 | public static void main(String[] args) {
6 |
7 | P1Class obj = new P1Class();
8 | System.out.println(obj.a);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/L45_AccessSpecifier/P1/P1Inherited.java:
--------------------------------------------------------------------------------
1 | package L45_AccessSpecifier.P1;
2 |
3 | public class P1Inherited extends P1Class {
4 |
5 | public void fun() {
6 |
7 | a = 10;
8 |
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/L45_AccessSpecifier/P2/P2Client.java:
--------------------------------------------------------------------------------
1 | package L45_AccessSpecifier.P2;
2 |
3 | import L45_AccessSpecifier.P1.P1Class;
4 |
5 | public class P2Client {
6 |
7 | public static void main(String[] args) {
8 |
9 | P1Class obj = new P1Class();
10 | System.out.println(obj.a);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/L45_AccessSpecifier/P2/P2Inherited.java:
--------------------------------------------------------------------------------
1 | package L45_AccessSpecifier.P2;
2 |
3 | import L45_AccessSpecifier.P1.P1Class;
4 |
5 | public class P2Inherited extends P1Class {
6 |
7 | public void fun() {
8 |
9 | a = 10;
10 |
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/src/L45_Static/C.java:
--------------------------------------------------------------------------------
1 | package L45_Static;
2 |
3 | public class C extends P{
4 |
5 | // @Override
6 | // public void fun() {
7 | //
8 | // }
9 | }
10 |
--------------------------------------------------------------------------------
/src/L45_Static/Client.java:
--------------------------------------------------------------------------------
1 | package L45_Static;
2 |
3 | public class Client {
4 |
5 | public static void main(String[] args) {
6 |
7 | // Student s = new Student("A");
8 | // s.introduceYourself();
9 | //
10 | // Student s1 = new Student("B");
11 | // s1.introduceYourself();
12 | //
13 | // System.out.println(Student.totalStudents);
14 | //
15 | // Student.getNoStudents();
16 |
17 | // OC oc = new OC();
18 | // OC.IC ic = oc.new IC();
19 |
20 | OC.IC ic = new OC.IC() ;
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/L45_Static/OC.java:
--------------------------------------------------------------------------------
1 | package L45_Static;
2 |
3 | public class OC {
4 |
5 | public static class IC{
6 |
7 |
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/L45_Static/Overloading.java:
--------------------------------------------------------------------------------
1 | package L45_Static;
2 |
3 | public class Overloading {
4 |
5 | public static void main(String[] args) {
6 |
7 | sum(10, 20);
8 | }
9 |
10 | // public static void sum(int a, int b) {
11 | // System.out.println("In 2 Args Sum");
12 | // System.out.println(a + b);
13 | // }
14 |
15 | public static int sum(int a, int b) {
16 | System.out.println("In Return Sum");
17 | return a + b;
18 | }
19 |
20 | public static void sum(int a, int b, int c) {
21 | System.out.println("In 3 Args Sum");
22 | System.out.println(a + b + c);
23 | }
24 |
25 | public static void sum(double a, double b) {
26 | System.out.println("In Double Sum");
27 | System.out.println(a + b);
28 | }
29 |
30 | public static void sum(int b, int c, int... a) {
31 |
32 | System.out.println("in var args");
33 |
34 | // for(int val : a) {
35 | // System.out.println(val);
36 | // }
37 |
38 | for (int i = 0; i < a.length; i++) {
39 | System.out.println(a[i]);
40 | }
41 |
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/src/L45_Static/P.java:
--------------------------------------------------------------------------------
1 | package L45_Static;
2 |
3 | public class P {
4 |
5 | public final void fun() {
6 |
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/L45_Static/Student.java:
--------------------------------------------------------------------------------
1 | package L45_Static;
2 |
3 | public class Student {
4 |
5 | String name;
6 | final int rollNo;
7 | static int totalStudents;
8 |
9 | public Student(String name) {
10 | this.name = name;
11 |
12 | totalStudents++;
13 | this.rollNo = totalStudents;
14 | }
15 |
16 | // non static fxn : non static variable access ? Yes
17 | // non static fxn : static variable access ? Yes
18 | // non static fxn : non static fxn call ? Yes
19 | // non static fxn : static fxn call ? Yes
20 |
21 | public void introduceYourself() {
22 | System.out.println(name + " has roll no " + rollNo);
23 | }
24 |
25 | public static void sayHi() {
26 | int a;
27 | }
28 |
29 | // static fxn : non static variable access ? No
30 | // static fxn : static variable access ? Yes
31 | // static fxn : non static fxn call ? No
32 | // static fxn : static fxn call ? Yes
33 |
34 | public static void getNoStudents() {
35 |
36 | sayHi();
37 | System.out.println("Total Students are : " + totalStudents);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/L46_HashMap/Demo.java:
--------------------------------------------------------------------------------
1 | package L46_HashMap;
2 |
3 | import java.util.ArrayList;
4 | import java.util.HashMap;
5 |
6 | public class Demo {
7 |
8 | public static void main(String[] args) {
9 |
10 | HashMap> map = new HashMap<>() ;
11 |
12 | map.put(10, new ArrayList<>()) ;
13 | map.put(20, new ArrayList<>()) ;
14 |
15 | System.out.println(map);
16 |
17 | map.get(10).add(100) ;
18 | map.get(10).add(200) ;
19 |
20 | System.out.println(map);
21 |
22 | map.get(20).add(300) ;
23 | map.get(20).add(400) ;
24 |
25 | System.out.println(map);
26 |
27 |
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/L46_HashMap/HashMapDemo.java:
--------------------------------------------------------------------------------
1 | package L46_HashMap;
2 |
3 | import java.util.ArrayList;
4 | import java.util.HashMap;
5 | import java.util.Set;
6 |
7 | public class HashMapDemo {
8 |
9 | public static void main(String[] args) {
10 |
11 | HashMap map = new HashMap<>();
12 |
13 | // put
14 | map.put("India", 10);
15 | map.put("US", 20);
16 | map.put("UK", 5);
17 | map.put("Aus", 3);
18 |
19 | System.out.println(map);
20 |
21 | // get
22 | System.out.println(map.get("US"));
23 | System.out.println(map.get("China"));
24 |
25 | // containsKey
26 | System.out.println(map.containsKey("China"));
27 | System.out.println(map.containsKey("US"));
28 |
29 | // remove
30 | System.out.println(map.remove("US"));
31 | System.out.println(map.remove("China"));
32 | System.out.println(map);
33 |
34 | // print
35 |
36 | // way 1
37 | Set keys = map.keySet();
38 |
39 | for (String key : keys) {
40 | System.out.println(key + " -> " + map.get(key));
41 | }
42 |
43 | // way 2
44 | for (String key : map.keySet()) {
45 | System.out.println(key + " -> " + map.get(key));
46 | }
47 |
48 | // way 3
49 | ArrayList list = new ArrayList<>(map.keySet());
50 |
51 | for (String key : list) {
52 | System.out.println(key + " -> " + map.get(key));
53 | }
54 |
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/L47_HashMapImplementation/Client.java:
--------------------------------------------------------------------------------
1 | package L47_HashMapImplementation;
2 |
3 | public class Client {
4 |
5 | public static void main(String[] args) {
6 |
7 | HashMap map = new HashMap();
8 |
9 | map.put("A", 10);
10 | map.put("B", 30);
11 | map.put("C", 20);
12 | map.put("D", 80);
13 | map.put("E", 60);
14 | map.put("F", 70);
15 | map.put("G", 20);
16 | map.put("H", 10);
17 | map.put("I", 70);
18 | System.out.println(map);
19 |
20 | map.put("A", 100);
21 | System.out.println(map);
22 |
23 | System.out.println(map.get("B"));
24 | System.out.println(map.get("F"));
25 |
26 | System.out.println(map.containsKey("B"));
27 | System.out.println(map.containsKey("F"));
28 |
29 | System.out.println(map.remove("B")) ;
30 | System.out.println(map);
31 |
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/L47_QPS/BookAllocation.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | import java.util.Scanner;
4 |
5 | public class BookAllocation {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in);
10 |
11 | int nob = scn.nextInt();
12 | int nos = scn.nextInt();
13 |
14 | int[] pages = new int[nob];
15 |
16 | for (int i = 0; i < nob; i++) {
17 | pages[i] = scn.nextInt();
18 | }
19 |
20 | // bs logic ...
21 | int lo = 0;
22 | int hi = 0;
23 |
24 | for (int val : pages)
25 | hi += val;
26 |
27 | int finalAns = 0;
28 |
29 | while (lo <= hi) {
30 |
31 | int mid = (lo + hi) / 2;
32 |
33 | if (isItPossible(pages, nos, mid)) {
34 | finalAns = mid;
35 | hi = mid - 1;
36 | } else {
37 | lo = mid + 1;
38 | }
39 |
40 | }
41 |
42 | System.out.println(finalAns);
43 |
44 | }
45 |
46 | public static boolean isItPossible(int[] pages, int nos, int mid) {
47 |
48 | int students = 1;
49 | int pagesRead = 0;
50 |
51 | int bn = 0;
52 |
53 | while (bn < pages.length) {
54 |
55 | if (pagesRead + pages[bn] <= mid) {
56 | pagesRead += pages[bn];
57 | bn++;
58 | } else {
59 | students++;
60 | pagesRead = 0;
61 |
62 | if (students > nos)
63 | return false;
64 |
65 | }
66 |
67 | }
68 |
69 | return true;
70 | }
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/src/L47_QPS/CountSay.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | public class CountSay {
4 |
5 | public static void main(String[] args) {
6 |
7 | System.out.println(countAndSay(5));
8 |
9 | }
10 |
11 | public static String countAndSay(int n) {
12 |
13 | if(n == 1) {
14 | return "1" ;
15 | }
16 |
17 | String rr = countAndSay(n-1) ;
18 | return compress(rr) ;
19 | }
20 |
21 | public static String compress(String str) {
22 |
23 | String ans = "";
24 | int count = 1;
25 |
26 | for (int i = 0; i <= str.length() - 2; i++) {
27 |
28 | if (str.charAt(i) == str.charAt(i + 1)) {
29 | count++;
30 | } else {
31 | ans = ans + count + str.charAt(i);
32 | count = 1;
33 | }
34 | }
35 |
36 | ans = ans + count + str.charAt(str.length() - 1);
37 |
38 | return ans;
39 |
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/L47_QPS/FirstMissingPositive.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | public class FirstMissingPositive {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[] arr = { 1, 2, 0 };
8 |
9 | System.out.println(firstMissingPositive(arr));
10 | }
11 |
12 | public static int firstMissingPositive(int[] arr) {
13 |
14 | int n = arr.length;
15 |
16 | // 1. ignore all -ve and > n values
17 | for (int i = 0; i < n; i++) {
18 |
19 | if (arr[i] <= 0 || arr[i] > n) {
20 | arr[i] = n + 1;
21 | }
22 | }
23 |
24 | // 2. values which are present, -ve mark
25 | for (int i = 0; i < n; i++) {
26 |
27 | int val = Math.abs(arr[i]) - 1;
28 |
29 | if (val != n && arr[val] > 0)
30 | arr[val] = -arr[val];
31 |
32 | }
33 |
34 | // 3. iterate over array to find out the index which is having +ve no.
35 | for (int i = 0; i < n; i++) {
36 |
37 | if (arr[i] > 0) {
38 | return i + 1;
39 | }
40 | }
41 |
42 | return n + 1;
43 |
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/src/L47_QPS/HammingDistance.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | public class HammingDistance {
4 |
5 | public static void main(String[] args) {
6 |
7 | int x = 1 ;
8 | int y = 4 ;
9 |
10 | int xor = x ^ y ;
11 | int count = 0 ;
12 |
13 | while(xor > 0) {
14 |
15 | if((xor & 1) == 1)
16 | count++ ;
17 |
18 | xor >>= 1 ;
19 |
20 | }
21 |
22 | System.out.println(count);
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/L47_QPS/Hoodies.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | import java.util.ArrayList;
4 | import java.util.LinkedList;
5 | import java.util.Queue;
6 | import java.util.Scanner;
7 |
8 | public class Hoodies {
9 |
10 | public static void main(String[] args) {
11 |
12 | Scanner scn = new Scanner(System.in);
13 |
14 | ArrayList order = new ArrayList<>();
15 |
16 | Queue[] q = new Queue[5];
17 |
18 | for (int i = 0; i < q.length; i++) {
19 | q[i] = new LinkedList<>();
20 | }
21 |
22 | int ops = scn.nextInt();
23 |
24 | while (ops > 0) {
25 |
26 | char ch = scn.next().charAt(0);
27 |
28 | if (ch == 'E') {
29 |
30 | int cno = scn.nextInt();
31 | int rno = scn.nextInt();
32 |
33 | q[cno].add(rno);
34 |
35 | if (!order.contains(cno))
36 | order.add(cno);
37 |
38 | } else {
39 |
40 | int courseRemove = order.get(0);
41 | int rollRemove = q[courseRemove].remove();
42 |
43 | System.out.println(courseRemove + " " + rollRemove);
44 |
45 | if(q[courseRemove].isEmpty()) {
46 | order.remove(0) ;
47 | }
48 | }
49 |
50 | ops--;
51 | }
52 |
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/L47_QPS/IncOps.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | import java.util.Scanner;
4 |
5 | public class IncOps {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in);
10 |
11 | int n = scn.nextInt();
12 | int m = scn.nextInt();
13 |
14 | int[] arr = new int[n + 1];
15 |
16 | for (int i = 1; i <= m; i++) {
17 |
18 | int a = scn.nextInt();
19 | int b = scn.nextInt();
20 | int k = scn.nextInt();
21 |
22 | arr[a] += k;
23 | arr[b + 1] -= k;
24 |
25 | }
26 |
27 | int max = Integer.MIN_VALUE;
28 |
29 | int sum = 0;
30 | for (int i = 0; i < arr.length - 1; i++) {
31 |
32 | sum += arr[i];
33 |
34 | if (sum > max)
35 | max = sum;
36 | }
37 |
38 | System.out.println(max);
39 |
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/src/L47_QPS/KConcatenation.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | public class KConcatenation {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[] arr = { 1, -2, 1 };
8 |
9 | System.out.println(kConcatenationMaxSum(arr, 5));
10 |
11 | }
12 |
13 | public static int kConcatenationMaxSum(int[] arr, int k) {
14 |
15 | int mod = 1000000007 ;
16 |
17 | long sum = 0;
18 | for (int val : arr) {
19 | sum += val;
20 | }
21 |
22 | if (k == 1) {
23 | return kadane(arr);
24 | } else if (sum < 0) {
25 | return kadane2Repeat(arr);
26 | } else {
27 | return (int) ((kadane2Repeat(arr) + (k - 2) * sum) % mod);
28 | }
29 | }
30 |
31 | public static int kadane2Repeat(int[] arr) {
32 |
33 | int[] na = new int[arr.length * 2];
34 |
35 | for (int i = 0; i < arr.length; i++) {
36 | na[i] = arr[i];
37 | na[arr.length + i] = arr[i];
38 | }
39 |
40 | return kadane(na);
41 | }
42 |
43 | public static int kadane(int[] arr) {
44 |
45 | int sum = arr[0];
46 | int max = arr[0];
47 |
48 | for (int i = 1; i < arr.length; i++) {
49 |
50 | sum = Math.max(sum + arr[i], arr[i]);
51 |
52 | if (sum > max)
53 | max = sum;
54 | }
55 |
56 | if (max < 0)
57 | max = 0;
58 |
59 | return max;
60 |
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/src/L47_QPS/LLPalindrome.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | import L47_QPS.MergeSort.ListNode;
4 |
5 | public class LLPalindrome {
6 |
7 | public static void main(String[] args) {
8 | // TODO Auto-generated method stub
9 |
10 | }
11 |
12 |
13 | public boolean isPalindrome(ListNode head) {
14 |
15 | ListNode[] left = new ListNode[1] ;
16 | left[0] = head ;
17 | return isPalindromeR(head, left);
18 |
19 | }
20 |
21 | public boolean isPalindromeR(ListNode right, ListNode[] left) {
22 |
23 | if (right == null)
24 | return true;
25 |
26 | boolean res = isPalindromeR(right.next, left);
27 |
28 | if (left[0].val == right.val && res) {
29 | left[0] = left[0].next;
30 | return true;
31 | } else {
32 | left[0] = left[0].next;
33 | return false;
34 | }
35 |
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/L47_QPS/MST1.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | import java.util.Scanner;
4 |
5 | public class MST1 {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in);
10 |
11 | int tc = scn.nextInt();
12 |
13 | int[] arr = new int[tc];
14 | int max = Integer.MIN_VALUE;
15 |
16 | for (int i = 0; i < arr.length; i++) {
17 | arr[i] = scn.nextInt();
18 | max = Math.max(max, arr[i]);
19 | }
20 |
21 | int n = max;
22 | int[] strg = new int[n + 1];
23 | strg[1] = 0;
24 |
25 | for (int i = 2; i <= n; i++) {
26 |
27 | int ans = strg[i - 1];
28 |
29 | if (i % 2 == 0)
30 | ans = Math.min(ans, strg[i / 2]);
31 |
32 | if (i % 3 == 0)
33 | ans = Math.min(ans, strg[i / 3]);
34 |
35 | strg[i] = ans + 1;
36 |
37 | }
38 |
39 | for (int i = 0; i < tc; i++)
40 | System.out.println("Case " + (i + 1) + ": " + strg[arr[i]]);
41 |
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/src/L47_QPS/MaxWindowK.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | import java.util.Deque;
4 | import java.util.LinkedList;
5 |
6 | public class MaxWindowK {
7 |
8 | public static void main(String[] args) {
9 |
10 | "abc".compareTo("def") ;
11 | int[] arr = { 80, 7, 5, 10, 50, 40, 60, 90 };
12 | int k = 4;
13 |
14 | Deque q = new LinkedList<>();
15 |
16 | for (int i = 0; i < k; i++) {
17 |
18 | while (!q.isEmpty() && arr[i] >= arr[q.peekLast()]) {
19 | q.removeLast();
20 | }
21 |
22 | q.add(i);
23 | }
24 |
25 | System.out.println(arr[q.peekFirst()]);
26 |
27 | for (int i = k; i < arr.length; i++) {
28 |
29 | // out of window
30 | if (!q.isEmpty() && q.peekFirst() == i - k) {
31 | q.removeFirst();
32 | }
33 |
34 | // new value remove , smaller values remove
35 | while (!q.isEmpty() && arr[i] >= arr[q.peekLast()]) {
36 | q.removeLast();
37 | }
38 |
39 | // self add
40 | q.addLast(i);
41 |
42 | // ans
43 | System.out.println(arr[q.peekFirst()]);
44 |
45 | }
46 |
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/src/L47_QPS/MaximumSumIncreasingSubsequence.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | public class MaximumSumIncreasingSubsequence {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[] arr = { 10, 5, 4, 3 };
8 |
9 | int[] strg = new int[arr.length];
10 |
11 | for (int i = 0; i < arr.length; i++) {
12 | strg[i] = arr[i];
13 | }
14 |
15 | for (int i = 0; i < arr.length; i++) {
16 |
17 | for (int j = 0; j < i; j++) {
18 |
19 | if (arr[j] < arr[i]) {
20 |
21 | int jContribution = strg[j] + arr[i];
22 |
23 | if (jContribution > strg[i])
24 | strg[i] = jContribution;
25 |
26 | }
27 |
28 | }
29 |
30 | }
31 |
32 | int max = Integer.MIN_VALUE;
33 | for (int val : strg)
34 | max = Math.max(val, max);
35 |
36 | System.out.println(max);
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/src/L47_QPS/Partitioning3Way.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | public class Partitioning3Way {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[] arr = { 1, 14, 5, 20, 4, 2, 54, 20, 87, 98, 3, 1, 32 };
8 |
9 | partitioning(arr, 14, 20);
10 |
11 | for (int val : arr) {
12 | System.out.print(val + " ");
13 | }
14 | }
15 |
16 | public static void partitioning(int[] arr, int ll, int hl) {
17 |
18 | int lo = 0;
19 | int mid = 0;
20 | int hi = arr.length - 1;
21 |
22 | while (mid <= hi) {
23 |
24 | if (arr[mid] < ll) {
25 |
26 | int temp = arr[lo];
27 | arr[lo] = arr[mid];
28 | arr[mid] = temp;
29 |
30 | lo++;
31 | mid++;
32 |
33 | } else if (arr[mid] >= ll && arr[mid] <= hl) {
34 |
35 | mid++;
36 |
37 | } else if (arr[mid] > hl) {
38 |
39 | int temp = arr[hi];
40 | arr[hi] = arr[mid];
41 | arr[mid] = temp;
42 |
43 | hi--;
44 |
45 | }
46 |
47 | }
48 |
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/src/L47_QPS/PivotIndex.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | public class PivotIndex {
4 |
5 | public static void main(String[] args) {
6 | // TODO Auto-generated method stub
7 |
8 | }
9 |
10 | public int pivotIndex2(int[] nums) {
11 |
12 | int[] left = new int[nums.length];
13 |
14 | left[0] = nums[0];
15 | for (int i = 1; i < nums.length; i++) {
16 | left[i] = left[i - 1] + nums[i];
17 | }
18 |
19 | int[] right = new int[nums.length];
20 |
21 | right[right.length - 1] = nums[nums.length - 1];
22 | for (int i = nums.length - 2; i >= 0; i--) {
23 | right[i] = right[i + 1] + nums[i];
24 | }
25 |
26 | for (int i = 0; i < nums.length; i++) {
27 |
28 | if (left[i] == right[i]) {
29 | return i;
30 | }
31 | }
32 |
33 | return -1;
34 |
35 | }
36 |
37 | public int pivotIndex3(int[] nums) {
38 |
39 | int rs = 0;
40 | for (int val : nums) {
41 | rs += val;
42 | }
43 |
44 | int ls = 0;
45 |
46 | for (int i = 0; i < nums.length; i++) {
47 |
48 | rs -= nums[i];
49 |
50 | if (ls == rs)
51 | return i;
52 |
53 | ls += nums[i] ;
54 |
55 | }
56 |
57 | return -1 ;
58 |
59 | }
60 | }
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/src/L47_QPS/PrintSubarrays0Sum.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | import java.util.ArrayList;
4 | import java.util.HashMap;
5 |
6 | public class PrintSubarrays0Sum {
7 |
8 | public static void main(String[] args) {
9 |
10 | int[] arr = { 6, 3, -1, -3, 4, -2, 2, 4, 6, -12, -7 };
11 |
12 | printSubarray0Sum(arr);
13 |
14 | }
15 |
16 | public static void printSubarray0Sum(int[] arr) {
17 |
18 | HashMap> map = new HashMap<>();
19 |
20 | map.put(0, new ArrayList<>());
21 | map.get(0).add(-1);
22 |
23 | int sum = 0;
24 |
25 | for (int i = 0; i < arr.length; i++) {
26 |
27 | // prefix sum
28 | sum += arr[i];
29 |
30 | // create a new entry
31 | if (!map.containsKey(sum)) {
32 | map.put(sum, new ArrayList<>());
33 | }
34 |
35 | // ans
36 | ArrayList temp = map.get(sum);
37 | for (int val : temp) {
38 | System.out.println(val + 1 + " -> " + i);
39 | }
40 |
41 | // add your index corresponding to prefix sum
42 | map.get(sum).add(i);
43 |
44 | }
45 |
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/src/L47_QPS/ReorderList.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | import L47_QPS.MergeSort.ListNode;
4 |
5 | public class ReorderList {
6 |
7 | public static void main(String[] args) {
8 |
9 | }
10 |
11 | public ListNode mid(ListNode head) {
12 |
13 | ListNode slow = head;
14 | ListNode fast = head;
15 |
16 | while (fast.next != null && fast.next.next != null) {
17 | slow = slow.next;
18 | fast = fast.next.next;
19 | }
20 |
21 | return slow;
22 |
23 | }
24 |
25 | public ListNode reverseI(ListNode head) {
26 |
27 | ListNode prev = null;
28 | ListNode curr = head;
29 |
30 | while (curr != null) {
31 |
32 | ListNode ahead = curr.next;
33 | curr.next = prev;
34 |
35 | prev = curr;
36 | curr = ahead;
37 |
38 | }
39 |
40 | return prev;
41 |
42 | }
43 |
44 | public void reorderList(ListNode h1) {
45 |
46 | ListNode midN = mid(h1);
47 | ListNode h2 = midN.next;
48 | midN.next = null;
49 |
50 | h2 = reverseI(h2);
51 |
52 | ListNode t1 = h1;
53 | ListNode t2 = h2;
54 |
55 | while (t1 != null && t2 != null) {
56 |
57 | ListNode a1 = t1.next;
58 | ListNode a2 = t2.next;
59 |
60 | t1.next = t2;
61 | t2.next = a1;
62 |
63 | t1 = a1;
64 | t2 = a2;
65 | }
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/src/L47_QPS/Sort012.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | public class Sort012 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[] arr = { 0, 1, 1, 0, 1, 2, 1, 2, 0, 0, 0, 1 };
8 |
9 | sort012(arr);
10 |
11 | for (int val : arr) {
12 | System.out.print(val + " ");
13 | }
14 | }
15 |
16 | public static void sort012(int[] arr) {
17 |
18 | int lo = 0;
19 | int mid = 0;
20 | int hi = arr.length - 1;
21 |
22 | while (mid <= hi) {
23 |
24 | if (arr[mid] == 0) {
25 |
26 | int temp = arr[lo];
27 | arr[lo] = arr[mid];
28 | arr[mid] = temp;
29 |
30 | lo++;
31 | mid++;
32 |
33 | } else if (arr[mid] == 1) {
34 |
35 | mid++;
36 |
37 | } else if (arr[mid] == 2) {
38 |
39 | int temp = arr[hi];
40 | arr[hi] = arr[mid];
41 | arr[mid] = temp;
42 |
43 | hi--;
44 |
45 | }
46 |
47 | }
48 |
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/src/L47_QPS/Subarray0sum.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | import java.util.HashSet;
4 |
5 | public class Subarray0sum {
6 |
7 | public static void main(String[] args) {
8 |
9 | int[] arr = { 6, 3, -1, -3, 4, -2, 2, 4, 6, -12, -7 };
10 |
11 | System.out.println(subarray0sum(arr)) ;
12 |
13 | }
14 |
15 | public static boolean subarray0sum(int[] arr) {
16 |
17 | HashSet set = new HashSet<>();
18 | set.add(0);
19 |
20 | int sum = 0;
21 |
22 | for (int i = 0; i < arr.length; i++) {
23 |
24 | sum += arr[i];
25 |
26 | if (set.contains(sum)) {
27 | return true;
28 | }
29 |
30 | set.add(sum);
31 | }
32 |
33 | return false;
34 |
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/L47_QPS/SumSubsequenceWidths.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | import java.util.Arrays;
4 |
5 | public class SumSubsequenceWidths {
6 |
7 | public static void main(String[] args) {
8 |
9 | int[] arr = { 5, 69, 89, 92, 31, 16, 25, 45, 63, 40, 16, 56, 24, 40, 75, 82, 40, 12, 50, 62, 92, 44, 67, 38, 92,
10 | 22, 91, 24, 26, 21, 100, 42, 23, 56, 64, 43, 95, 76, 84, 79, 89, 4, 16, 94, 16, 77, 92, 9, 30, 13 };
11 | System.out.println(sumSubseqWidths(arr));
12 | }
13 |
14 | public static int sumSubseqWidths(int[] arr) {
15 |
16 | Arrays.sort(arr);
17 |
18 | int mod = 1000_000_007;
19 |
20 | // create an array which is storing powers of 2
21 | long[] power = new long[arr.length];
22 |
23 | power[0] = 1;
24 | for (int i = 1; i < power.length; i++) {
25 | power[i] = (power[i - 1] * 2) % mod;
26 | }
27 |
28 | long max = 0;
29 | long min = 0;
30 |
31 | // go to every element and ask for its contribution in max and min
32 | for (int i = 0; i < arr.length; i++) {
33 |
34 | max = (max + arr[i] * power[i]) % mod;
35 | min = (min + arr[i] * power[arr.length - i - 1]) % mod;
36 |
37 | }
38 |
39 | return (int) (max - min + mod) % mod;
40 |
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/src/L47_QPS/UglyNumber.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | public class UglyNumber {
4 |
5 | public static void main(String[] args) {
6 |
7 | System.out.println(nthUglyNumber(9));
8 | }
9 |
10 | public static int nthUglyNumber(int n) {
11 |
12 | int[] strg = new int[n + 1];
13 | strg[0] = 1;
14 |
15 | int i2 = 0;
16 | int i3 = 0;
17 | int i5 = 0;
18 |
19 | for (int i = 1; i <= n; i++) {
20 |
21 | int candidate2 = 2 * strg[i2];
22 | int candidate3 = 3 * strg[i3];
23 | int candidate5 = 5 * strg[i5];
24 |
25 | int minimum = Math.min(candidate2, Math.min(candidate3, candidate5));
26 |
27 | strg[i] = minimum;
28 |
29 | if (minimum == candidate2)
30 | i2++;
31 |
32 | if (minimum == candidate3)
33 | i3++;
34 |
35 | if (minimum == candidate5)
36 | i5++;
37 |
38 | }
39 |
40 | // for (int i = 0; i < strg.length; i++) {
41 | // System.out.println(i + " -> " + strg[i]);
42 | // }
43 |
44 | return strg[n] ;
45 |
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/src/L47_QPS/ZigZag.java:
--------------------------------------------------------------------------------
1 | package L47_QPS;
2 |
3 | public class ZigZag {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[] arr = { 4, 3, 7, 8, 6, 2, 1, 9 };
8 |
9 | boolean flag = true;
10 |
11 | for (int i = 0; i <= arr.length - 2; i++) {
12 |
13 | // a < b
14 | // arr[i] < arr[i+1]
15 | if (flag) {
16 |
17 | if (arr[i] > arr[i + 1]) {
18 |
19 | int temp = arr[i];
20 | arr[i] = arr[i + 1];
21 | arr[i + 1] = temp;
22 | }
23 |
24 | }
25 |
26 | // b > c
27 | // arr[i] > arr[i+1]
28 | else {
29 |
30 | if (arr[i] < arr[i + 1]) {
31 |
32 | int temp = arr[i];
33 | arr[i] = arr[i + 1];
34 | arr[i + 1] = temp;
35 | }
36 |
37 | }
38 |
39 | flag = !flag;
40 | }
41 |
42 | for (int val : arr) {
43 | System.out.print(val + " ");
44 | }
45 | System.out.println();
46 |
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern13.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern13 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5 ;
8 |
9 | int nst = 1 ;
10 |
11 | int row = 1 ;
12 | while(row <= 2*n-1)
13 | {
14 | // stars
15 | for(int cst = 1 ; cst <= nst ; cst = cst + 1)
16 | System.out.print("*");
17 |
18 | // update
19 | System.out.println();
20 |
21 | if(row <= n-1)
22 | nst = nst + 1 ;
23 | else
24 | nst = nst - 1 ;
25 |
26 | row = row + 1 ;
27 |
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern14.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern14 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = n - 1;
10 | int nst = 1;
11 |
12 | int row = 1;
13 | while (row <= 2 * n - 1) {
14 |
15 | // spaces
16 | for (int csp = 1; csp <= nsp; csp = csp + 1)
17 | System.out.print(" ");
18 |
19 | // stars
20 | for (int cst = 1; cst <= nst; cst = cst + 1)
21 | System.out.print("*");
22 |
23 | // update
24 | System.out.println();
25 |
26 | if (row <= n - 1) {
27 | nsp = nsp - 1;
28 | nst = nst + 1;
29 | } else {
30 | nsp = nsp + 1;
31 | nst = nst - 1;
32 | }
33 |
34 | row = row + 1;
35 |
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern15.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern15 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = 0;
10 | int nst = n;
11 |
12 | int row = 1;
13 | while (row <= 2 * n - 1) {
14 |
15 | // spaces
16 | for (int csp = 1; csp <= nsp; csp = csp + 1)
17 | System.out.print(" ");
18 |
19 | // stars
20 | for (int cst = 1; cst <= nst; cst = cst + 1)
21 | System.out.print("* ");
22 |
23 | // update
24 | System.out.println();
25 |
26 | if (row <= n - 1) {
27 | nsp = nsp + 2;
28 | nst = nst - 1;
29 | } else {
30 | nsp = nsp - 2;
31 | nst = nst + 1;
32 | }
33 |
34 | row = row + 1;
35 |
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern16.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern16 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = n-1 ;
10 | int nst = n ;
11 |
12 | int row = 1;
13 | while (row <= 2 * n - 1) {
14 |
15 | // spaces
16 | for (int csp = 1; csp <= nsp; csp = csp + 1)
17 | System.out.print(" ");
18 |
19 | // stars
20 | for (int cst = 1; cst <= nst; cst = cst + 1)
21 | System.out.print("* ");
22 |
23 | // update
24 | System.out.println();
25 |
26 | if (row <= n - 1) {
27 | nsp = nsp - 1;
28 | nst = nst - 1;
29 | } else {
30 | nsp = nsp + 1;
31 | nst = nst + 1;
32 | }
33 |
34 | row = row + 1;
35 |
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern17.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern17 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 21;
8 |
9 | int nsp = 1;
10 | int nst = n / 2;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // stars
16 | for (int cst = 1; cst <= nst; cst = cst + 1)
17 | System.out.print("* ");
18 |
19 | // spaces
20 | for (int csp = 1; csp <= nsp; csp = csp + 1)
21 | System.out.print(" ");
22 |
23 | // stars
24 | for (int cst = 1; cst <= nst; cst = cst + 1)
25 | System.out.print("* ");
26 |
27 | // update
28 | System.out.println();
29 |
30 | if (row <= n / 2) {
31 | nsp = nsp + 2;
32 | nst = nst - 1;
33 | } else {
34 | nsp = nsp - 2;
35 | nst = nst + 1;
36 | }
37 |
38 | row = row + 1;
39 |
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern18.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern18 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 13;
8 |
9 | int nsp = n/2 ;
10 | int nst = 1 ;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // spaces
16 | for (int csp = 1; csp <= nsp; csp = csp + 1)
17 | System.out.print(" ");
18 |
19 | // stars
20 | for (int cst = 1; cst <= nst; cst = cst + 1)
21 | System.out.print("* ");
22 |
23 | // update
24 | System.out.println();
25 |
26 | if (row <= n/2) {
27 | nsp = nsp - 1;
28 | nst = nst + 2;
29 | } else {
30 | nsp = nsp + 1;
31 | nst = nst - 2;
32 | }
33 |
34 | row = row + 1;
35 |
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern20.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern20 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 13;
8 |
9 | int nsp = n/2 ;
10 | int nst = 1 ;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // spaces
16 | for (int csp = 1; csp <= nsp; csp = csp + 1)
17 | System.out.print(" ");
18 |
19 | // stars
20 | for (int cst = 1; cst <= nst; cst = cst + 1) {
21 |
22 | if(cst == 1 || cst == nst)
23 | System.out.print("* ");
24 | else
25 | System.out.print(" ");
26 |
27 | }
28 |
29 | // update
30 | System.out.println();
31 |
32 | if (row <= n/2) {
33 | nsp = nsp - 1;
34 | nst = nst + 2;
35 | } else {
36 | nsp = nsp + 1;
37 | nst = nst - 2;
38 | }
39 |
40 | row = row + 1;
41 |
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern21.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern21 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 7;
8 |
9 | int nst = 1;
10 | int nsp = 2 * n - 3;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // stars
16 | for (int cst = 1; cst <= nst; cst = cst + 1)
17 | System.out.print("* ");
18 |
19 | // spaces
20 | for (int csp = 1; csp <= nsp; csp = csp + 1)
21 | System.out.print(" ");
22 |
23 | // stars
24 | int cst = 1 ;
25 |
26 | if(row == n )
27 | cst = 2;
28 |
29 | for (; cst <= nst; cst = cst + 1)
30 | System.out.print("* ");
31 |
32 | // update
33 | System.out.println();
34 |
35 | nst = nst + 1;
36 | nsp = nsp - 2;
37 |
38 | row = row + 1;
39 |
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern22.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern22 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 7;
8 |
9 | int nst = n;
10 | int nsp = -1;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // stars
16 | for (int cst = 1; cst <= nst; cst = cst + 1)
17 | System.out.print("* ");
18 |
19 | // spaces
20 | for (int csp = 1; csp <= nsp; csp = csp + 1)
21 | System.out.print(" ");
22 |
23 | // stars
24 | int cst = 1 ;
25 |
26 | if(row == 1)
27 | cst = 2 ;
28 |
29 | for (; cst <= nst; cst = cst + 1)
30 | System.out.print("* ");
31 |
32 | // update
33 | System.out.println();
34 |
35 | nst = nst - 1;
36 | nsp = nsp + 2;
37 |
38 | row = row + 1;
39 |
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern23.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern23 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = n - 1;
10 | int nst = 1;
11 |
12 | int val = 1;
13 |
14 | int row = 1;
15 | while (row <= n) {
16 |
17 | // work
18 | // spaces
19 | for (int csp = 1; csp <= nsp; csp = csp + 1)
20 | System.out.print(" ");
21 |
22 | // stars
23 | for (int cst = 1; cst <= nst; cst = cst + 1)
24 | System.out.print(val + " ");
25 |
26 | // changes
27 | System.out.println();
28 | row = row + 1;
29 | nsp = nsp - 1;
30 | nst = nst + 2;
31 |
32 | }
33 |
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern24.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern24 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = n - 1;
10 | int nst = 1;
11 |
12 | int val ;
13 |
14 | int row = 1;
15 | while (row <= n) {
16 |
17 | val = row ;
18 |
19 | // work
20 | // spaces
21 | for (int csp = 1; csp <= nsp; csp = csp + 1)
22 | System.out.print(" ");
23 |
24 | // stars
25 | for (int cst = 1; cst <= nst; cst = cst + 1)
26 | System.out.print(val + " ");
27 |
28 | // changes
29 | System.out.println();
30 | row = row + 1;
31 | nsp = nsp - 1;
32 | nst = nst + 2;
33 |
34 | }
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern25.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern25 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = n - 1;
10 | int nst = 1;
11 |
12 | int val ;
13 |
14 | int row = 1;
15 | while (row <= n) {
16 |
17 | val = 1 ;
18 |
19 | // work
20 | // spaces
21 | for (int csp = 1; csp <= nsp; csp = csp + 1)
22 | System.out.print("\t");
23 |
24 | // stars
25 | for (int cst = 1; cst <= nst; cst = cst + 1) {
26 | System.out.print(val + "\t");
27 | val = val + 1;
28 | }
29 |
30 | // changes
31 | System.out.println();
32 | row = row + 1;
33 | nsp = nsp - 1;
34 | nst = nst + 2;
35 |
36 | }
37 |
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern26.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern26 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = n - 1;
10 | int nst = 1;
11 |
12 | int val = 1;
13 |
14 | int row = 1;
15 | while (row <= n) {
16 |
17 | // work
18 | // spaces
19 | for (int csp = 1; csp <= nsp; csp = csp + 1)
20 | System.out.print(" ");
21 |
22 | // stars
23 | for (int cst = 1; cst <= nst; cst = cst + 1)
24 | System.out.print(val + " ");
25 |
26 | // changes
27 | System.out.println();
28 | row = row + 1;
29 | nsp = nsp - 1;
30 | nst = nst + 2;
31 |
32 | }
33 |
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern7.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern7 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 9;
8 |
9 | // rows
10 | int row = 1;
11 |
12 | while (row <= n) {
13 |
14 | // work
15 | for (int col = 1; col <= n; col = col + 1) {
16 |
17 | if(row == 1 || row == n || col == 1 || col == n)
18 | System.out.print("* ");
19 | else
20 | System.out.print(" ");
21 |
22 | }
23 |
24 | // changes
25 | System.out.println();
26 | row = row + 1;
27 |
28 | }
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/L4_Patterns/Pattern8.java:
--------------------------------------------------------------------------------
1 | package L4_Patterns;
2 |
3 | public class Pattern8 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 9;
8 |
9 | // rows
10 | int row = 1;
11 |
12 | while (row <= n) {
13 |
14 | // work
15 | for (int col = 1; col <= n; col = col + 1) {
16 |
17 | if(row == col || row + col == n+1)
18 | System.out.print("* ");
19 | else
20 | System.out.print(" ");
21 |
22 | }
23 |
24 | // changes
25 | System.out.println();
26 | row = row + 1;
27 |
28 | }
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/L52_GenericTree/GTClient.java:
--------------------------------------------------------------------------------
1 | package L52_GenericTree;
2 |
3 | public class GTClient {
4 |
5 | // 10 3 20 2 50 0 60 0 30 0 40 1 70 0
6 | public static void main(String[] args) {
7 |
8 | GenericTree gt = new GenericTree();
9 | gt.display();
10 |
11 | // System.out.println(gt.size());
12 | // System.out.println(gt.max());
13 | // System.out.println(gt.ht());
14 | // System.out.println(gt.find(600));
15 |
16 | // gt.mirror();
17 | // gt.display();
18 | //
19 | // gt.printAtLevel(2);
20 | // gt.linearize();
21 | // gt.display();
22 |
23 | // gt.display2();
24 |
25 | gt.preorder();
26 | gt.postorder();
27 |
28 | gt.levelOrder();
29 |
30 | gt.levelOrderLineWise();
31 | gt.levelOrderZigZag();
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/L53_NagarroTest/TreasureIsland.java:
--------------------------------------------------------------------------------
1 | package L53_NagarroTest;
2 |
3 | public class TreasureIsland {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[][] arr = { { 0 }, { 1 } };
8 |
9 | System.out.println(treasureIsland(arr, 0, new int[arr[0].length], ""));
10 | }
11 |
12 | public static int treasureIsland(int[][] arr, int bidx, int[] keys, String ans) {
13 |
14 | if (bidx == arr.length) {
15 |
16 | if (keysCheck(keys)) {
17 | System.out.println(ans);
18 | return 1;
19 | }
20 |
21 | return 0;
22 | }
23 |
24 | int count = 0;
25 |
26 | // exclude
27 | count += treasureIsland(arr, bidx + 1, keys, ans);
28 |
29 | // keys change
30 | for (int i = 0; i < keys.length; i++)
31 | keys[i] += arr[bidx][i];
32 |
33 | // include
34 | count += treasureIsland(arr, bidx + 1, keys, ans + "B" + bidx + " ");
35 |
36 | // undo
37 | for (int i = 0; i < keys.length; i++)
38 | keys[i] -= arr[bidx][i];
39 |
40 | return count;
41 |
42 | }
43 |
44 | public static boolean keysCheck(int[] keys) {
45 |
46 | for (int i = 0; i < keys.length; i++) {
47 |
48 | if (keys[i] == 0)
49 | return false;
50 |
51 | }
52 |
53 | return true;
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/src/L54_BinaryTree/Client.java:
--------------------------------------------------------------------------------
1 | package L54_BinaryTree;
2 |
3 | public class Client {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[] arr = { 10, 20, 30, 40, 50, -1, 70, -1, -1, -1, -1, -1, -1 };
8 |
9 | LevelOrderTreeConstruct t = new LevelOrderTreeConstruct(arr);
10 | t.display();
11 |
12 | int[] arr1 = { 10, 20, 40, -1, -1, 50, -1, -1, 30, -1, 70, -1, -1 };
13 | PreOrderTreeConstruct t1 = new PreOrderTreeConstruct(arr1);
14 | t1.display();
15 |
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/L54_BinaryTree/PreOrderTreeConstruct.java:
--------------------------------------------------------------------------------
1 | package L54_BinaryTree;
2 |
3 | public class PreOrderTreeConstruct {
4 |
5 | private class Node {
6 | int data;
7 | Node left;
8 | Node right;
9 |
10 | public Node(int data) {
11 | this.data = data;
12 | }
13 | }
14 |
15 | private Node root;
16 | private int i = 0;
17 |
18 | public PreOrderTreeConstruct(int[] arr) {
19 | root = construct(arr);
20 | }
21 |
22 | private Node construct(int[] arr) {
23 |
24 | if (arr[i] == -1) {
25 | i++ ;
26 | return null;
27 | }
28 |
29 | Node nn = new Node(arr[i++]);
30 |
31 | nn.left = construct(arr);
32 | nn.right = construct(arr);
33 |
34 | return nn;
35 | }
36 |
37 | public void display() {
38 |
39 | System.out.println("-----------------------");
40 | display(root);
41 | System.out.println("-----------------------");
42 | }
43 |
44 | private void display(Node node) {
45 |
46 | if (node == null)
47 | return;
48 |
49 | String str = "";
50 |
51 | if (node.left == null)
52 | str += ".";
53 | else
54 | str += node.left.data;
55 |
56 | str += " -> " + node.data + " <- ";
57 |
58 | if (node.right == null)
59 | str += ".";
60 | else
61 | str += node.right.data;
62 |
63 | System.out.println(str);
64 |
65 | display(node.left);
66 | display(node.right);
67 |
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/src/L58_BST/Client.java:
--------------------------------------------------------------------------------
1 | package L58_BST;
2 |
3 | public class Client {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[] in = {}; // { 10, 20, 30, 40, 50, 60, 70 };
8 |
9 | BST bst = new BST(in);
10 | bst.display();
11 |
12 | // System.out.println(bst.max());
13 | // System.out.println(bst.find(35));
14 | // bst.replaceWithSumLarger();
15 | // bst.display();
16 |
17 | // bst.printInRange(15, 65);
18 | bst.add3(100);
19 | bst.add3(50);
20 | bst.add3(200);
21 | bst.add3(25);
22 | bst.add3(75);
23 | bst.add3(12);
24 | bst.add3(30);
25 | bst.add3(60);
26 | bst.add3(80);
27 | bst.add3(35);
28 | bst.display();
29 |
30 | // bst.remove(50);
31 | //
32 | // bst.display();
33 | // bst.remove(60);
34 | // bst.display();
35 | // bst.remove(75);
36 | // bst.display();
37 | bst.remove(200) ;
38 | bst.display();
39 | bst.remove(100);
40 | bst.display();
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/src/L5_PatternsDataType/DataTypeDemo.java:
--------------------------------------------------------------------------------
1 | package L5_PatternsDataType;
2 |
3 | public class DataTypeDemo {
4 |
5 | public static void main(String[] args) {
6 |
7 | char ch = 'a';
8 | char ch1 = 'b';
9 |
10 | char i = (char) (ch + ch1);
11 | System.out.println(i);
12 |
13 | boolean b = true;
14 |
15 | System.out.println(b);
16 |
17 | if (b) {
18 |
19 | }
20 |
21 | System.out.println("Hello" + 10 + 20);
22 |
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/L5_PatternsDataType/Inverse.java:
--------------------------------------------------------------------------------
1 | package L5_PatternsDataType;
2 |
3 | public class Inverse {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 54312;
8 |
9 | int pos = 1;
10 | int ans = 0;
11 |
12 | while (n != 0) {
13 |
14 | int rem = n % 10;
15 |
16 | ans = ans + pos * (int)Math.pow(10, rem - 1);
17 |
18 | n = n / 10;
19 | pos = pos + 1;
20 | }
21 |
22 | System.out.println(ans);
23 |
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/src/L5_PatternsDataType/Pattern19.java:
--------------------------------------------------------------------------------
1 | package L5_PatternsDataType;
2 |
3 | public class Pattern19 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 21;
8 |
9 | int nsp = -1;
10 | int nst = n / 2 + 1;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // stars
16 | for (int cst = 1; cst <= nst; cst = cst + 1)
17 | System.out.print("* ");
18 |
19 | // spaces
20 | for (int csp = 1; csp <= nsp; csp = csp + 1)
21 | System.out.print(" ");
22 |
23 | // stars
24 | int cst = 1;
25 |
26 | if (row == 1 || row == n)
27 | cst = 2;
28 |
29 | for (; cst <= nst; cst = cst + 1)
30 | System.out.print("* ");
31 |
32 | // update
33 | System.out.println();
34 |
35 | if (row <= n / 2) {
36 | nsp = nsp + 2;
37 | nst = nst - 1;
38 | } else {
39 | nsp = nsp - 2;
40 | nst = nst + 1;
41 | }
42 |
43 | row = row + 1;
44 |
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/L5_PatternsDataType/Pattern27.java:
--------------------------------------------------------------------------------
1 | package L5_PatternsDataType;
2 |
3 | public class Pattern27 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = n - 1;
10 | int nst = 1;
11 |
12 | int val;
13 |
14 | int row = 1;
15 | while (row <= n) {
16 |
17 | val = 1;
18 |
19 | // work
20 | // spaces
21 | for (int csp = 1; csp <= nsp; csp = csp + 1)
22 | System.out.print(" ");
23 |
24 | // stars
25 | for (int cst = 1; cst <= nst; cst = cst + 1) {
26 |
27 | System.out.print(val + " ");
28 |
29 | if(cst <= nst/2)
30 | val ++ ;
31 | else
32 | val-- ;
33 |
34 | }
35 |
36 | // changes
37 | System.out.println();
38 | row = row + 1;
39 | nsp = nsp - 1;
40 | nst = nst + 2;
41 |
42 | }
43 |
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/L5_PatternsDataType/Pattern28.java:
--------------------------------------------------------------------------------
1 | package L5_PatternsDataType;
2 |
3 | public class Pattern28 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = n - 1;
10 | int nst = 1;
11 |
12 | int val;
13 |
14 | int row = 1;
15 | while (row <= n) {
16 |
17 | val = row;
18 |
19 | // work
20 | // spaces
21 | for (int csp = 1; csp <= nsp; csp = csp + 1)
22 | System.out.print(" ");
23 |
24 | // stars
25 | for (int cst = 1; cst <= nst; cst = cst + 1) {
26 |
27 | System.out.print(val + " ");
28 |
29 | if (cst <= nst / 2)
30 | val = val + 1 ;
31 | else
32 | val = val - 1;
33 |
34 | }
35 |
36 | // changes
37 | System.out.println();
38 | row = row + 1;
39 | nsp = nsp - 1;
40 | nst = nst + 2;
41 |
42 | }
43 |
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/L5_PatternsDataType/Pattern29.java:
--------------------------------------------------------------------------------
1 | package L5_PatternsDataType;
2 |
3 | public class Pattern29 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nsp = n - 1;
10 | int nst = 1;
11 |
12 | int row = 1;
13 | while (row <= n) {
14 |
15 | // work
16 | // spaces
17 | for (int csp = 1; csp <= nsp; csp = csp + 1)
18 | System.out.print(" ");
19 |
20 | // stars
21 | for (int cst = 1; cst <= nst; cst = cst + 1) {
22 |
23 | if (cst == 1 || cst == nst)
24 | System.out.print(row + " ");
25 | else
26 | System.out.print(0 + " ");
27 |
28 | }
29 |
30 | // changes
31 | System.out.println();
32 | row = row + 1;
33 | nsp = nsp - 1;
34 | nst = nst + 2;
35 |
36 | }
37 |
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/L5_PatternsDataType/Pattern30.java:
--------------------------------------------------------------------------------
1 | package L5_PatternsDataType;
2 |
3 | public class Pattern30 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int row = 1;
10 | while (row <= n) {
11 |
12 | int val = n ;
13 |
14 | // work
15 | for (int col = 1; col <= n; col = col + 1) {
16 | System.out.print(val + " ");
17 | val = val - 1 ;
18 | }
19 |
20 |
21 | // changes
22 | System.out.println();
23 | row = row + 1;
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/L5_PatternsDataType/Pattern31.java:
--------------------------------------------------------------------------------
1 | package L5_PatternsDataType;
2 |
3 | public class Pattern31 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int row = 1;
10 | while (row <= n) {
11 |
12 | int val = n;
13 |
14 | // work
15 | for (int col = 1; col <= n; col = col + 1) {
16 |
17 | if (row + col == n + 1)
18 | System.out.print("* ");
19 | else
20 | System.out.print(val + " ");
21 |
22 | val = val - 1;
23 |
24 | }
25 |
26 | // changes
27 | System.out.println();
28 | row = row + 1;
29 |
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/L5_PatternsDataType/Pattern32.java:
--------------------------------------------------------------------------------
1 | package L5_PatternsDataType;
2 |
3 | public class Pattern32 {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 5;
8 |
9 | int nst = 1 ;
10 |
11 | int val = 1 ;
12 |
13 | int row = 1;
14 | while (row <= 2 * n - 1) {
15 |
16 | // stars
17 | for(int cst = 1 ; cst <= nst ; cst=cst+1) {
18 | if(cst % 2 == 0)
19 | System.out.print("* ");
20 | else
21 | System.out.print(val + " ");
22 | }
23 |
24 |
25 | // update
26 | System.out.println();
27 |
28 | if(row <= n-1) {
29 | nst = nst + 2 ;
30 | val = val + 1 ;
31 | }
32 | else {
33 | nst = nst - 2 ;
34 | val = val - 1 ;
35 | }
36 |
37 | row = row + 1;
38 |
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/L5_PatternsDataType/PatternRhombus.java:
--------------------------------------------------------------------------------
1 | package L5_PatternsDataType;
2 |
3 | public class PatternRhombus {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 7;
8 |
9 | int nsp = n / 2;
10 | int nst = 1;
11 | int val = 1;
12 |
13 | int row = 1;
14 | while (row <= n) {
15 |
16 | int temp = val;
17 |
18 | // spaces
19 | for (int csp = 1; csp <= nsp; csp = csp + 1)
20 | System.out.print(" ");
21 |
22 | // stars
23 | for (int cst = 1; cst <= nst; cst = cst + 1) {
24 | System.out.print(temp + " ");
25 |
26 | if (cst <= nst / 2)
27 | temp = temp + 1;
28 | else
29 | temp = temp - 1;
30 | }
31 |
32 | // update
33 | System.out.println();
34 |
35 | if (row <= n / 2) {
36 | nsp = nsp - 1;
37 | nst = nst + 2;
38 | val = val + 1;
39 | } else {
40 | nsp = nsp + 1;
41 | nst = nst - 2;
42 | val = val - 1;
43 | }
44 |
45 | row = row + 1;
46 |
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/L5_PatternsDataType/Rotate.java:
--------------------------------------------------------------------------------
1 | package L5_PatternsDataType;
2 |
3 | public class Rotate {
4 |
5 | public static void main(String[] args) {
6 |
7 | int n = 123456;
8 | int rot = 23;
9 |
10 | int temp = n ; // 123456
11 |
12 | // no. of digits
13 | int nod = 0;
14 |
15 | while (temp != 0) {
16 | nod = nod + 1;
17 | temp = temp / 10;
18 | }
19 |
20 | rot = rot % nod ;
21 |
22 | // rotate
23 | int divisor = (int) Math.pow(10, rot); // 10^4
24 | int rem = n % divisor; // 3456
25 | int quot = n / divisor; // 12
26 |
27 | int mult = (int) Math.pow(10, nod - rot);
28 |
29 | int ans = rem * mult + quot;
30 |
31 | System.out.println(ans);
32 |
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/L60_AVL/Client.java:
--------------------------------------------------------------------------------
1 | package L60_AVL;
2 |
3 | public class Client {
4 |
5 | public static void main(String[] args) {
6 |
7 | AVL avl = new AVL() ;
8 | avl.add(20);
9 | avl.add(25);
10 | avl.add(30);
11 | avl.add(10);
12 | avl.add(5);
13 | avl.add(15);
14 | avl.add(27);
15 | avl.add(19);
16 | avl.add(16);
17 |
18 | avl.display();
19 |
20 |
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/L61_Generics/Class/Client.java:
--------------------------------------------------------------------------------
1 | package L61_Generics.Class;
2 |
3 | import java.util.ArrayList;
4 |
5 | import L61_Generics.Fxn.Car;
6 |
7 | public class Client {
8 |
9 | public static void main(String[] args) throws Exception {
10 |
11 | // Pair p = new Pair<>() ;
12 |
13 | LinkedListGeneric ll = new LinkedListGeneric() ;
14 | ll.addLast(new Car(100, 5000, "Red"));
15 | ll.addLast(new Car(50, 7000, "Black"));
16 | ll.addLast(new Car(200, 2000, "White"));
17 | ll.addLast(new Car(30, 1000, "Blue"));
18 | ll.addFirst(new Car(150, 3000, "Gray"));
19 | ll.display();
20 |
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/L61_Generics/Class/Pair.java:
--------------------------------------------------------------------------------
1 | package L61_Generics.Class;
2 |
3 | public class Pair {
4 |
5 | A a ;
6 | B b ;
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/L61_Generics/Fxn/Car.java:
--------------------------------------------------------------------------------
1 | package L61_Generics.Fxn;
2 |
3 | public class Car implements Comparable {
4 |
5 | int speed;
6 | int price;
7 | String color;
8 |
9 | public Car(int speed, int price, String color) {
10 |
11 | this.speed = speed;
12 | this.price = price;
13 | this.color = color;
14 | }
15 |
16 | @Override
17 | public String toString() {
18 | return "S:" + speed + "\tP:" + price + "\tC:" + color;
19 | }
20 |
21 | @Override
22 | public int compareTo(Car other) {
23 |
24 | // speed
25 | return this.speed - other.speed;
26 |
27 | // price
28 | // return other.price - this.price ;
29 |
30 | // color
31 | // return this.color.compareTo(other.color) ;
32 | }
33 |
34 | }
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/src/L61_Generics/Fxn/CarColorComparator.java:
--------------------------------------------------------------------------------
1 | package L61_Generics.Fxn;
2 |
3 | import java.util.Comparator;
4 |
5 | public class CarColorComparator implements Comparator{
6 |
7 | @Override
8 | public int compare(Car t, Car o) {
9 | return t.color.compareTo(o.color) ;
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/src/L61_Generics/Fxn/CarPriceComparator.java:
--------------------------------------------------------------------------------
1 | package L61_Generics.Fxn;
2 |
3 | import java.util.Comparator;
4 |
5 | public class CarPriceComparator implements Comparator{
6 |
7 | @Override
8 | public int compare(Car t, Car o) {
9 | return o.price - t.price ;
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/src/L61_Generics/Fxn/CarSpeedComparator.java:
--------------------------------------------------------------------------------
1 | package L61_Generics.Fxn;
2 |
3 | import java.util.Comparator;
4 |
5 | public class CarSpeedComparator implements Comparator{
6 |
7 | @Override
8 | public int compare(Car t, Car o) {
9 | return t.speed - o.speed ;
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/src/L61_Generics/Fxn/IntegerComparator.java:
--------------------------------------------------------------------------------
1 | package L61_Generics.Fxn;
2 |
3 | import java.util.Comparator;
4 |
5 | public class IntegerComparator implements Comparator {
6 |
7 | @Override
8 | public int compare(Integer t, Integer o) {
9 | return t - o ;
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/src/L61_Interfaces/C.java:
--------------------------------------------------------------------------------
1 | package L61_Interfaces;
2 |
3 | public class C implements I1, I2 {
4 |
5 | @Override
6 | public int fun(int a) {
7 | // TODO Auto-generated method stub
8 | return 0;
9 | }
10 |
11 | @Override
12 | public void fun() {
13 | // TODO Auto-generated method stub
14 |
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/L61_Interfaces/Client.java:
--------------------------------------------------------------------------------
1 | package L61_Interfaces;
2 |
3 | import java.util.LinkedList;
4 | import java.util.Queue;
5 |
6 | public class Client {
7 |
8 | public static void main(String[] args) {
9 |
10 |
11 |
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/L61_Interfaces/DSI.java:
--------------------------------------------------------------------------------
1 | package L61_Interfaces;
2 |
3 | public interface DSI extends StackI{
4 |
5 | public void display() ;
6 | }
7 |
--------------------------------------------------------------------------------
/src/L61_Interfaces/I1.java:
--------------------------------------------------------------------------------
1 | package L61_Interfaces;
2 |
3 | public interface I1 {
4 |
5 | public void fun() ;
6 | }
7 |
--------------------------------------------------------------------------------
/src/L61_Interfaces/I2.java:
--------------------------------------------------------------------------------
1 | package L61_Interfaces;
2 |
3 | public interface I2 {
4 |
5 | public int fun(int a) ;
6 | }
7 |
--------------------------------------------------------------------------------
/src/L61_Interfaces/Stack.java:
--------------------------------------------------------------------------------
1 | package L61_Interfaces;
2 |
3 | public class Stack implements DSI{
4 |
5 | @Override
6 | public void push(int item) {
7 | // TODO Auto-generated method stub
8 |
9 | }
10 |
11 | @Override
12 | public int pop() {
13 | // TODO Auto-generated method stub
14 | return 0;
15 | }
16 |
17 | @Override
18 | public int peek() {
19 | // TODO Auto-generated method stub
20 | return 0;
21 | }
22 |
23 | @Override
24 | public void display() {
25 | // TODO Auto-generated method stub
26 |
27 | }
28 |
29 |
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/L61_Interfaces/StackI.java:
--------------------------------------------------------------------------------
1 | package L61_Interfaces;
2 |
3 | public interface StackI {
4 |
5 | public void push(int item) ;
6 |
7 | public int pop() ;
8 |
9 | public int peek() ;
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/L62_Heap/HeapClient.java:
--------------------------------------------------------------------------------
1 | package L62_Heap;
2 |
3 | public class HeapClient {
4 |
5 | public static void main(String[] args) {
6 |
7 | Heap heap = new Heap();
8 | heap.add(10);
9 | heap.display();
10 | heap.add(20);
11 | heap.display();
12 | heap.add(30);
13 | heap.display();
14 | heap.add(40);
15 | heap.display();
16 | heap.add(5);
17 | heap.display();
18 | heap.add(3);
19 | heap.display();
20 |
21 | System.out.println(heap.remove());
22 | // heap.display();
23 | System.out.println(heap.remove());
24 | // heap.display();
25 | System.out.println(heap.remove());
26 | // heap.display();
27 | System.out.println(heap.remove());
28 | // heap.display();
29 | System.out.println(heap.remove());
30 | // heap.display();
31 | System.out.println(heap.remove());
32 |
33 | }
34 |
35 | }
--------------------------------------------------------------------------------
/src/L62_Heap/HeapGClient.java:
--------------------------------------------------------------------------------
1 | package L62_Heap;
2 |
3 | import L61_Generics.Fxn.Car;
4 |
5 | public class HeapGClient {
6 |
7 | public static void main(String[] args) {
8 |
9 | Car[] cars = new Car[5];
10 | cars[0] = new Car(1000, 400, "Red");
11 | cars[1] = new Car(2000, 200, "Yellow");
12 | cars[2] = new Car(500, 900, "Black");
13 | cars[3] = new Car(300, 30, "Grey");
14 | cars[4] = new Car(700, 60, "White");
15 |
16 | HeapGeneric heapg = new HeapGeneric<>();
17 | heapg.add(cars[0]);
18 | heapg.add(cars[1]);
19 | heapg.add(cars[2]);
20 | heapg.add(cars[3]);
21 | heapg.add(cars[4]);
22 |
23 | System.out.println(heapg.remove());
24 | System.out.println(heapg.remove());
25 | System.out.println(heapg.remove());
26 | System.out.println(heapg.remove());
27 | System.out.println(heapg.remove());
28 |
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/src/L69_SegmentTree/Client.java:
--------------------------------------------------------------------------------
1 | package L69_SegmentTree;
2 |
3 | public class Client {
4 |
5 | public static void main(String[] args) {
6 |
7 | int[] arr = { 5, 2, 10, 3, -6, -4, 12, 13 };
8 | SegmentTree st = new SegmentTree(arr, new QueryMax()) ;
9 | st.display();
10 |
11 | System.out.println(st.rangeQuery(2, 5));
12 | st.update(4, 2);
13 | st.display();
14 | System.out.println(st.rangeQuery(2, 5));
15 |
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/L69_SegmentTree/QueryMax.java:
--------------------------------------------------------------------------------
1 | package L69_SegmentTree;
2 |
3 | public class QueryMax implements STI{
4 |
5 | @Override
6 | public int operation(int v1, int v2) {
7 | return Math.max(v1, v2) ;
8 | }
9 |
10 | @Override
11 | public int defaultValue() {
12 | return Integer.MIN_VALUE ;
13 | }
14 |
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/src/L69_SegmentTree/QueryMin.java:
--------------------------------------------------------------------------------
1 | package L69_SegmentTree;
2 |
3 | public class QueryMin implements STI{
4 |
5 | @Override
6 | public int operation(int v1, int v2) {
7 | return Math.min(v1, v2) ;
8 | }
9 |
10 | @Override
11 | public int defaultValue() {
12 | return Integer.MAX_VALUE ;
13 | }
14 |
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/src/L69_SegmentTree/QueryProduct.java:
--------------------------------------------------------------------------------
1 | package L69_SegmentTree;
2 |
3 | public class QueryProduct implements STI{
4 |
5 | @Override
6 | public int operation(int v1, int v2) {
7 | return v1 * v2 ;
8 | }
9 |
10 | @Override
11 | public int defaultValue() {
12 | return 1 ;
13 | }
14 |
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/src/L69_SegmentTree/QuerySum.java:
--------------------------------------------------------------------------------
1 | package L69_SegmentTree;
2 |
3 | public class QuerySum implements STI{
4 |
5 | @Override
6 | public int operation(int v1, int v2) {
7 | return v1 + v2 ;
8 | }
9 |
10 | @Override
11 | public int defaultValue() {
12 | return 0 ;
13 | }
14 |
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/src/L69_SegmentTree/STI.java:
--------------------------------------------------------------------------------
1 | package L69_SegmentTree;
2 |
3 | public interface STI {
4 |
5 | public int operation(int v1 , int v2) ;
6 |
7 | public int defaultValue() ;
8 | }
9 |
--------------------------------------------------------------------------------
/src/L6_Functions/Armstrong.java:
--------------------------------------------------------------------------------
1 | package L6_Functions;
2 |
3 | public class Armstrong {
4 |
5 | public static void main(String[] args) {
6 |
7 | printArmstrong(10, 10000);
8 |
9 | }
10 |
11 | public static void printArmstrong(int lo, int hi) {
12 |
13 | for (int n = lo; n <= hi; n = n + 1) {
14 | boolean res = isArmstrong(n);
15 |
16 | if (res == true)
17 | System.out.println(n);
18 | }
19 | }
20 |
21 | public static boolean isArmstrong(int n) {
22 |
23 | int nod = noOfDigits(n);
24 | int on = n;
25 |
26 | int ans = 0;
27 |
28 | while (n != 0) {
29 |
30 | int rem = n % 10;
31 |
32 | ans = ans + (int) Math.pow(rem, nod);
33 |
34 | n = n / 10;
35 | }
36 |
37 | if (ans == on)
38 | return true;
39 | else
40 | return false;
41 |
42 | }
43 |
44 | public static int noOfDigits(int n) {
45 |
46 | int nod = 0;
47 |
48 | while (n != 0) {
49 | nod = nod + 1;
50 | n = n / 10;
51 | }
52 |
53 | return nod;
54 |
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/src/L6_Functions/ShoppingGame.java:
--------------------------------------------------------------------------------
1 | package L6_Functions;
2 |
3 | import java.util.Scanner;
4 |
5 | public class ShoppingGame {
6 |
7 | public static void main(String[] args) {
8 |
9 | Scanner scn = new Scanner(System.in);
10 |
11 | int tc = scn.nextInt();
12 |
13 | for (int t = 1; t <= tc; t++) {
14 |
15 | int aL = scn.nextInt();
16 | int hL = scn.nextInt();
17 |
18 | int aC = 0;
19 | int hC = 0;
20 |
21 | int i = 1;
22 |
23 | while (true) {
24 |
25 | // Aayush Turn
26 | if (i % 2 == 1) {
27 |
28 | // purchase
29 | if (aC + i <= aL)
30 | aC = aC + i;
31 | else {
32 | System.out.println("Harshit");
33 | break;
34 | }
35 |
36 | }
37 | // Harshit Turn
38 | else {
39 |
40 | // purchase
41 | if (hC + i <= hL)
42 | hC = hC + i;
43 | else {
44 | System.out.println("Aayush");
45 | break;
46 | }
47 | }
48 |
49 | i++;
50 | }
51 | }
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/src/L71_Huffman/Client.java:
--------------------------------------------------------------------------------
1 | package L71_Huffman;
2 |
3 | public class Client {
4 |
5 | public static void main(String[] args) {
6 |
7 | String str = "aaaabbcddddd";
8 | Huffman huffman = new Huffman(str);
9 |
10 | System.out.println(huffman.encode("dabd"));
11 | System.out.println(huffman.decode("0111010"));
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/L71_Trie/Client.java:
--------------------------------------------------------------------------------
1 | package L71_Trie;
2 |
3 | public class Client {
4 |
5 | public static void main(String[] args) {
6 |
7 | // String src = "aabcdaae";
8 | // String pat = "aaf";
9 | //
10 | // System.out.println(search(src, pat));
11 |
12 | Trie trie = new Trie() ;
13 |
14 | trie.addWord("ant");
15 | trie.addWord("arc");
16 | trie.addWord("and");
17 | trie.addWord("see");
18 | trie.addWord("sea");
19 | trie.addWord("seen");
20 | trie.addWord("an");
21 |
22 | trie.displayWords();
23 | trie.displayTrie();
24 | System.out.println(trie.searchWord("an"));
25 | System.out.println(trie.prefixWord("apt"));
26 |
27 | trie.removeWord("see");
28 | trie.removeWord("seen");
29 | trie.displayTrie();
30 | trie.displayWords();
31 |
32 | }
33 |
34 | public static int search(String src, String pat) {
35 |
36 | for (int i = 0; i <= src.length() - pat.length(); i++) {
37 |
38 | int j = 0;
39 | while (j < pat.length()) {
40 | if (src.charAt(i + j) != pat.charAt(j))
41 | break;
42 |
43 | j++;
44 | }
45 |
46 | if (j == pat.length())
47 | return i;
48 |
49 | }
50 |
51 | return -1;
52 |
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/L72_Abstract/DataStructure.java:
--------------------------------------------------------------------------------
1 | package L72_Abstract;
2 |
3 | public abstract class DataStructure {
4 |
5 | int size ;
6 |
7 | public int size() {
8 | return size ;
9 | }
10 |
11 | public abstract void display() ;
12 | }
13 |
--------------------------------------------------------------------------------
/src/L72_Abstract/Stack.java:
--------------------------------------------------------------------------------
1 | package L72_Abstract;
2 |
3 | public class Stack extends DataStructure {
4 |
5 | @Override
6 | public void display() {
7 | // TODO Auto-generated method stub
8 |
9 | }
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/L7_Array/PairOfRoses.java:
--------------------------------------------------------------------------------
1 | package L7_Array;
2 |
3 | import java.util.Arrays;
4 | import java.util.Scanner;
5 |
6 | public class PairOfRoses {
7 |
8 | public static void main(String[] args) {
9 |
10 | Scanner scn = new Scanner(System.in) ;
11 |
12 | int tc = scn.nextInt() ;
13 |
14 | while(tc > 0) {
15 |
16 | int n = scn.nextInt() ;
17 |
18 | int[] arr = new int[n] ;
19 |
20 | for (int i = 0; i < arr.length; i++) {
21 | arr[i] = scn.nextInt() ;
22 | }
23 |
24 | int target = scn.nextInt() ;
25 |
26 | targetSumPair(arr, target);
27 |
28 | tc -- ;
29 | }
30 | }
31 | public static void targetSumPair(int[] arr, int target) {
32 |
33 | int si = 0;
34 | int ei = 0 ;
35 | // array sort
36 | Arrays.sort(arr);
37 |
38 | // logic ...
39 | int i = 0;
40 | int j = arr.length - 1;
41 |
42 | while (i < j) {
43 |
44 | if (arr[i] + arr[j] > target)
45 | j--;
46 | else if (arr[i] + arr[j] < target)
47 | i++;
48 | else {
49 |
50 | si = i ;
51 | ei = j ;
52 | i++;
53 | j--;
54 |
55 | }
56 | }
57 |
58 | System.out.println("Deepak should buy roses whose prices are " + arr[si] + " and " + arr[ei] + ".");
59 |
60 | }
61 |
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/src/Nagarro_Qps/Buy_and_Sell.java:
--------------------------------------------------------------------------------
1 | package Nagarro_Qps;
2 |
3 | public class Buy_and_Sell {
4 |
5 | public static void main(String[] args) {
6 | // TODO Auto-generated method stub
7 | int [] arr = {7,1,5,3,6,4};
8 | System.out.println(buyandsell(arr));
9 |
10 | }
11 | public static int buyandsell(int []arr) {
12 | int max_profit=0;
13 | int min_price=Integer.MAX_VALUE;
14 | for (int i = 0; i < arr.length; i++) {
15 | if(min_price>arr[i]) {
16 | min_price=arr[i];
17 | }
18 | else {
19 | max_profit=Math.max(max_profit, arr[i]-min_price);
20 | }
21 | }
22 | return max_profit;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Nagarro_Qps/Gas_Station.java:
--------------------------------------------------------------------------------
1 | package Nagarro_Qps;
2 |
3 | public class Gas_Station {
4 |
5 | public static void main(String[] args) {
6 | // TODO Auto-generated method stub
7 | int [] gas= {1,2,3,4,5};
8 | int []cost= {3,4,5,1,2};
9 |
10 | }
11 | public static int Gas_Cost(int []gas,int []cost) {
12 | int res=0;
13 | int start=0;
14 | int curr=0;
15 | for (int i = 0; i < cost.length; i++) {
16 | res+=(gas[i]-cost[i]);
17 | curr+=gas[i]-cost[i];
18 | if(curr<0) {
19 | start=i+1;
20 | curr=0;
21 | }
22 | }
23 | if(res<0) {
24 | return -1;
25 | }
26 | else {
27 | return start;
28 |
29 | }
30 |
31 |
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/Nagarro_Qps/Kartik_Bhaiya_String.java:
--------------------------------------------------------------------------------
1 | package Nagarro_Qps;
2 |
3 | public class Kartik_Bhaiya_String {
4 |
5 | public static void main(String[] args) {
6 | // TODO Auto-generated method stub
7 | String str ="aababbbb";
8 | int k=2;
9 | System.out.println(Math.max(Kartik_Bhaiya_And_Strings(str, k, 'a'), Kartik_Bhaiya_And_Strings(str, k, 'b')));
10 |
11 | }
12 | public static int Kartik_Bhaiya_And_Strings(String str, int k,char c) {
13 | int ans =0;
14 | int i=0;
15 | int j=0;
16 | int count=0;
17 | while(jk) {
23 | if(str.charAt(i)==c) {
24 | count--;
25 | }
26 | i++;
27 | }
28 |
29 | ans=Math.max(ans, j-i+1);
30 | j++;
31 | }
32 | return ans;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/Nagarro_Qps/Leet_Code_Prodect.java:
--------------------------------------------------------------------------------
1 | package Nagarro_Qps;
2 |
3 | public class Leet_Code_Prodect {
4 |
5 | public static void main(String[] args) {
6 | // TODO Auto-generated method stub
7 | int arr[]= {5,6,3,4};
8 | int ans [] =Prodoct_Array2(arr);
9 | for (int i = 0; i < ans.length; i++) {
10 | System.out.print(ans[i]+" ");
11 | }
12 | }
13 | public static int [] Prodoct_Array(int [] arr) {
14 |
15 | int [] left = new int [arr.length];
16 | int [] right = new int [arr.length];
17 | left[0]=1;
18 | right[right.length-1]=1;
19 | for (int i = 1; i < right.length; i++) {
20 | left[i]=arr[i-1]*left[i-1];
21 | }
22 | for (int i = right.length-2; i>=0; i--) {
23 | right[i]=arr[i+1]*right[i+1];
24 | }
25 | for (int i = 0; i < right.length; i++) {
26 | left[i]=left[i]*right[i];
27 | }
28 | return left;
29 |
30 | }
31 |
32 | public static int [] Prodoct_Array2(int [] arr) {
33 |
34 | int [] left = new int [arr.length];
35 |
36 | left[0]=1;
37 |
38 | for (int i = 1; i < left.length; i++) {
39 | left[i]=arr[i-1]*left[i-1];
40 | }
41 | int r=1;
42 | for (int i = arr.length-1; i>=0; i--) {
43 | left[i]=left[i]*r;
44 | r=r*arr[i];
45 |
46 | }
47 |
48 |
49 | return left;
50 |
51 | }
52 | }
53 |
--------------------------------------------------------------------------------