Showing preview only (590K chars total). Download the full file or copy to clipboard to get everything.
Repository: kunal-kushwaha/DSA-Bootcamp-Java
Branch: main
Commit: 6bc4d8bf8ac5
Files: 453
Total size: 484.8 KB
Directory structure:
gitextract_kj9lo73p/
├── .gitignore
├── README.md
├── SYLLABUS.md
├── assignments/
│ ├── 01-flow-of-program.md
│ ├── 02-first-java.md
│ ├── 03-conditionals-loops.md
│ ├── 04-functions.md
│ ├── 05-arrays.md
│ ├── 06-searching.md
│ ├── 07-sorting.md
│ ├── 08-strings.md
│ ├── 09-patterns.md
│ ├── 10-recursion.md
│ ├── 11-bitwise.md
│ ├── 12-math.md
│ ├── 13-complexities.md
│ ├── 14-oop.md
│ ├── 15-linkedlist.md
│ ├── 16-stack-queue.md
│ ├── 17-trees.md
│ └── 18-heaps.md
└── lectures/
├── 05-first-java-program/
│ ├── first-idea-program/
│ │ ├── .idea/
│ │ │ ├── .gitignore
│ │ │ ├── description.html
│ │ │ ├── encodings.xml
│ │ │ ├── misc.xml
│ │ │ ├── modules.xml
│ │ │ ├── project-template.xml
│ │ │ └── vcs.xml
│ │ ├── first-idea-program.iml
│ │ └── src/
│ │ └── com/
│ │ └── kunal/
│ │ ├── Basics.java
│ │ ├── Inputs.java
│ │ ├── Main.java
│ │ ├── Prime.java
│ │ ├── Primitives.java
│ │ ├── Sum.java
│ │ ├── Temperature.java
│ │ └── TypeCasting.java
│ ├── first-tutorial/
│ │ ├── Demo.java
│ │ └── Main.java
│ └── notes/
│ ├── literals.txt
│ ├── notes.txt
│ └── type_conversion&casting.txt
├── 06-conditions-loops/
│ ├── code/
│ │ ├── .idea/
│ │ │ ├── .gitignore
│ │ │ ├── description.html
│ │ │ ├── encodings.xml
│ │ │ ├── misc.xml
│ │ │ ├── modules.xml
│ │ │ ├── project-template.xml
│ │ │ ├── uiDesigner.xml
│ │ │ └── vcs.xml
│ │ ├── code.iml
│ │ └── src/
│ │ └── com/
│ │ └── kunal/
│ │ ├── Calculator.java
│ │ ├── CaseCheck.java
│ │ ├── Conditionals.java
│ │ ├── CountNums.java
│ │ ├── Fibo.java
│ │ ├── Largest.java
│ │ ├── Loops.java
│ │ └── Reverse.java
│ └── switch/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── src/
│ │ └── com/
│ │ └── kunal/
│ │ ├── Main.java
│ │ └── NestedSwitch.java
│ └── switch.iml
├── 07-methods/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── ChangeValue.java
│ ├── Greeting.java
│ ├── Main.java
│ ├── Overloading.java
│ ├── PassingExample.java
│ ├── Questions.java
│ ├── Scope.java
│ ├── Shadowing.java
│ ├── StringExample.java
│ ├── Sum.java
│ ├── Swap.java
│ └── VarArgs.java
├── 08-arrays/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── ArrayListExample.java
│ ├── ColNoFixed.java
│ ├── Input.java
│ ├── Main.java
│ ├── Max.java
│ ├── MultiAL.java
│ ├── MultiDimension.java
│ ├── PassinginFunctions.java
│ └── Swap.java
├── 09-linear search/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── EvenDigits.java
│ ├── FindMin.java
│ ├── Main.java
│ ├── MaxWealth.java
│ ├── SearchIn2DArray.java
│ ├── SearchInRange.java
│ └── SearchInStrings.java
├── 10-binary search/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ ├── uiDesigner.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── BinarySearch.java
│ ├── Ceiling.java
│ ├── FirstAndLastPosition.java
│ ├── Floor.java
│ ├── InfiniteArray.java
│ ├── Mountain.java
│ ├── OrderAgnosticBS.java
│ ├── RBS.java
│ ├── RotationCount.java
│ ├── RowColMatrix.java
│ ├── SearchInMountain.java
│ ├── SmallestLetter.java
│ ├── SortedMatrix.java
│ └── SplitArray.java
├── 11-sorting/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ ├── uiDesigner.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── CyclicSort.java
│ ├── FindAllDuplicates.java
│ ├── FindAllMissing.java
│ ├── FindDuplicate.java
│ ├── Main.java
│ ├── MissingNumber.java
│ ├── MissingPositive.java
│ └── SetMismatch.java
├── 12-strings/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── Comparison.java
│ ├── Main.java
│ ├── Methods.java
│ ├── Operators.java
│ ├── Output.java
│ ├── Palin.java
│ ├── Performance.java
│ ├── PrettyPrinting.java
│ ├── SB.java
│ └── placeholders_list.txt
├── 13-patterns/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ └── Main.java
├── 14-recursion/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ ├── uiDesigner.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── arrays/
│ │ ├── Find.java
│ │ ├── RBS.java
│ │ └── Sorted.java
│ ├── backtracking/
│ │ ├── AllPaths.java
│ │ ├── Maze.java
│ │ ├── NKnights.java
│ │ ├── NQueens.java
│ │ └── SudokuSolver.java
│ ├── easy/
│ │ ├── CountZeros.java
│ │ ├── DigitProduct.java
│ │ ├── DigitSum.java
│ │ ├── Fact.java
│ │ ├── Nto1.java
│ │ ├── Palindrome.java
│ │ ├── Reverse.java
│ │ ├── Steps.java
│ │ └── Sum.java
│ ├── intro/
│ │ ├── BS.java
│ │ ├── Fibo.java
│ │ ├── Message.java
│ │ ├── NumbersExample.java
│ │ └── NumbersExampleRecursion.java
│ ├── patterns/
│ │ └── Triangle.java
│ ├── sorting/
│ │ ├── MergeSort.java
│ │ └── QuickSort.java
│ └── strings/
│ ├── Ascii.java
│ ├── Dice.java
│ ├── Permutations.java
│ ├── PhonePad.java
│ ├── Stream.java
│ ├── SubSeq.java
│ └── SubSet.java
├── 15-complexity/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ └── Fibo.java
├── 16-math/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ ├── uiDesigner.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── bitwise/
│ │ ├── FindUnique.java
│ │ ├── FlipImage.java
│ │ ├── MagicNumber.java
│ │ ├── NoOfDigits.java
│ │ ├── OddEven.java
│ │ ├── PowOfTwo.java
│ │ ├── Power.java
│ │ ├── RangeXOR.java
│ │ └── SetBits.java
│ └── maths/
│ ├── BinarySearchSQRT.java
│ ├── Factors.java
│ ├── GCD_LCM.java
│ ├── NewtonSQRT.java
│ ├── Prime.java
│ └── Seive.java
├── 17-oop/
│ ├── code/
│ │ ├── .idea/
│ │ │ ├── .gitignore
│ │ │ ├── description.html
│ │ │ ├── encodings.xml
│ │ │ ├── misc.xml
│ │ │ ├── modules.xml
│ │ │ ├── project-template.xml
│ │ │ ├── uiDesigner.xml
│ │ │ └── vcs.xml
│ │ ├── code.iml
│ │ └── src/
│ │ └── com/
│ │ └── kunal/
│ │ ├── abstractDemo/
│ │ │ ├── Daughter.java
│ │ │ ├── Main.java
│ │ │ ├── Parent.java
│ │ │ ├── Parent2.java
│ │ │ └── Son.java
│ │ ├── access/
│ │ │ ├── A.java
│ │ │ ├── Main.java
│ │ │ ├── ObjectDemo.java
│ │ │ └── SubClass.java
│ │ ├── cloning/
│ │ │ ├── Human.java
│ │ │ └── Main.java
│ │ ├── collections/
│ │ │ └── Main.java
│ │ ├── enumExamples/
│ │ │ ├── A.java
│ │ │ └── Basic.java
│ │ ├── exceptionHandling/
│ │ │ ├── Demo.java
│ │ │ ├── Main.java
│ │ │ └── MyException.java
│ │ ├── generics/
│ │ │ ├── CustomArrayList.java
│ │ │ ├── CustomGenArrayList.java
│ │ │ ├── GenericInterface.java
│ │ │ ├── LambdaFunctions.java
│ │ │ ├── Main.java
│ │ │ ├── WildcardExample.java
│ │ │ └── comparing/
│ │ │ ├── Main.java
│ │ │ └── Student.java
│ │ ├── interfaces/
│ │ │ ├── Brake.java
│ │ │ ├── CDPlayer.java
│ │ │ ├── Car.java
│ │ │ ├── ElecticEngine.java
│ │ │ ├── Engine.java
│ │ │ ├── Main.java
│ │ │ ├── Media.java
│ │ │ ├── NiceCar.java
│ │ │ ├── PowerEngine.java
│ │ │ ├── extendDemo/
│ │ │ │ ├── A.java
│ │ │ │ ├── B.java
│ │ │ │ └── Main.java
│ │ │ ├── extendDemo2/
│ │ │ │ ├── A.java
│ │ │ │ ├── B.java
│ │ │ │ └── Main.java
│ │ │ └── nested/
│ │ │ ├── A.java
│ │ │ └── Main.java
│ │ ├── introduction/
│ │ │ ├── Main.java
│ │ │ └── WrapperExample.java
│ │ ├── packages/
│ │ │ ├── a/
│ │ │ │ └── Greeting.java
│ │ │ └── b/
│ │ │ ├── Greeting.java
│ │ │ └── Message.java
│ │ ├── properties/
│ │ │ ├── inheritance/
│ │ │ │ ├── Box.java
│ │ │ │ ├── BoxColor.java
│ │ │ │ ├── BoxPrice.java
│ │ │ │ ├── BoxWeight.java
│ │ │ │ └── Main.java
│ │ │ └── polymorphism/
│ │ │ ├── Circle.java
│ │ │ ├── Main.java
│ │ │ ├── Numbers.java
│ │ │ ├── ObjectPrint.java
│ │ │ ├── Shapes.java
│ │ │ ├── Square.java
│ │ │ └── Triangle.java
│ │ ├── singleton/
│ │ │ ├── Main.java
│ │ │ ├── NotSubClass.java
│ │ │ ├── Singleton.java
│ │ │ └── SubClass.java
│ │ └── staticExample/
│ │ ├── Human.java
│ │ ├── InnerClasses.java
│ │ ├── Main.java
│ │ └── StaticBlock.java
│ └── notes/
│ ├── abstract.txt
│ ├── access_control.txt
│ ├── classes.txt
│ ├── constructors_this_finalize.txt
│ ├── inheritance.txt
│ ├── interface.txt
│ ├── notes.txt
│ ├── overloading.txt
│ ├── overriding.txt
│ ├── packages.txt
│ └── static.txt
├── 18-linkedlist/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ ├── uiDesigner.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── CLL.java
│ ├── DLL.java
│ ├── InterviewQuestions.java
│ ├── LL.java
│ ├── Main.java
│ └── MergeSort.java
├── 19-stacks-n-queues/
│ ├── code/
│ │ ├── .idea/
│ │ │ ├── .gitignore
│ │ │ ├── description.html
│ │ │ ├── encodings.xml
│ │ │ ├── misc.xml
│ │ │ ├── modules.xml
│ │ │ ├── project-template.xml
│ │ │ ├── uiDesigner.xml
│ │ │ └── vcs.xml
│ │ ├── code.iml
│ │ └── src/
│ │ └── com/
│ │ └── kunal/
│ │ ├── CircularQueue.java
│ │ ├── CustomQueue.java
│ │ ├── CustomStack.java
│ │ ├── DynamicQueue.java
│ │ ├── DynamicStack.java
│ │ ├── InBuiltExamples.java
│ │ ├── QueueMain.java
│ │ ├── StackException.java
│ │ └── StackMain.java
│ └── questions/
│ ├── LargestAreaHistogram.java
│ ├── QueueUsingStack.java
│ ├── QueueUsingStackRemove.java
│ ├── TwoStacks.java
│ ├── ValidParenMinAdd.java
│ └── ValidParenthesis.java
├── 20-trees/
│ └── code/
│ ├── AVL/
│ │ ├── .breakpoints
│ │ ├── .cache/
│ │ │ └── replit/
│ │ │ ├── __replit_disk_meta.json
│ │ │ ├── modules.stamp
│ │ │ └── nix/
│ │ │ └── env.json
│ │ ├── .classpath
│ │ ├── .project
│ │ ├── .replit
│ │ ├── .settings/
│ │ │ ├── org.eclipse.jdt.apt.core.prefs
│ │ │ ├── org.eclipse.jdt.core.prefs
│ │ │ └── org.eclipse.m2e.core.prefs
│ │ ├── .upm/
│ │ │ └── store.json
│ │ ├── AVL.java
│ │ └── Main.java
│ ├── Advance questions/
│ │ ├── DoubleLinkedList.java
│ │ ├── KthSmallest.java
│ │ ├── KthSmallest2.java
│ │ ├── Main.java
│ │ ├── PreIn.java
│ │ ├── TwoNodeSwap.java
│ │ ├── TwoSum.java
│ │ ├── VerticalTraversal.java
│ │ └── WordLadder.java
│ ├── Questions/
│ │ ├── .breakpoints
│ │ ├── .cache/
│ │ │ └── replit/
│ │ │ ├── __replit_disk_meta.json
│ │ │ ├── modules.stamp
│ │ │ └── nix/
│ │ │ └── env.json
│ │ ├── .classpath
│ │ ├── .project
│ │ ├── .replit
│ │ ├── .settings/
│ │ │ ├── org.eclipse.jdt.apt.core.prefs
│ │ │ ├── org.eclipse.jdt.core.prefs
│ │ │ └── org.eclipse.m2e.core.prefs
│ │ ├── .upm/
│ │ │ └── store.json
│ │ ├── BFS.java
│ │ ├── DFS.java
│ │ ├── Main.java
│ │ ├── PathSum.java
│ │ └── SD.java
│ ├── Segment trees/
│ │ ├── Main.java
│ │ └── SegmentTree.java
│ └── introduction/
│ ├── BST.java
│ ├── BinaryTree.java
│ └── Main.java
├── 21-StringBuffer/
│ └── code/
│ ├── Main.java
│ └── RandomString.java
├── 22-large numbers/
│ └── code/
│ ├── Factorial.java
│ └── Main.java
├── 23-file handling/
│ ├── code/
│ │ ├── Input.java
│ │ ├── Main.java
│ │ ├── Output.java
│ │ ├── new-file.txt
│ │ └── note.txt
│ └── notes/
│ └── notes.txt
├── 24-heaps/
│ └── code/
│ └── heaps-1/
│ ├── Heap.java
│ └── Main.java
├── 25-hashmaps/
│ └── code/
│ ├── Hashmaps introduction/
│ │ ├── HashMapFinal.java
│ │ └── Main.java
│ └── KarpRabin/
│ ├── KarpRabin.java
│ └── Main.java
├── 26-advance-sorting/
│ ├── CountSort/
│ │ └── Main.java
│ └── RadixSort/
│ └── Main.java
├── 27-huffman-coding/
│ └── code/
│ ├── Heap.java
│ ├── HuffmanCoder.java
│ └── Main.java
└── 28-sqrt-decomposition/
└── code/
└── Main.java
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Created by https://www.toptal.com/developers/gitignore/api/macos,intellij,java
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,intellij,java
### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/
# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml
# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/
# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$
# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
### Java ###
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# End of https://www.toptal.com/developers/gitignore/api/macos,intellij,java
================================================
FILE: README.md
================================================
# DSA + Interview preparation bootcamp
- Subscribe to the [YouTube channel](https://www.youtube.com/KunalKushwaha?sub_confirmation=1)
- [Lectures](https://www.youtube.com/playlist?list=PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ)
- [Course website](https://www.techwithkunal.com/courses/dsa)
- [Assignments](https://github.com/kunal-kushwaha/DSA-Bootcamp-Java/tree/main/assignments) (solutions can be found on LeetCode)
================================================
FILE: SYLLABUS.md
================================================
- [Complete Git & GitHub Course](https://youtu.be/apGV9Kg7ics)
- [Introduction to Programming](https://youtu.be/wn49bJOYAZM)
- [Types of languages](https://youtu.be/wn49bJOYAZM?t=171)
- [Memory management](https://youtu.be/wn49bJOYAZM?t=1488)
- [Flow of the program](https://youtu.be/lhELGQAV4gg)
- [Flowcharts](https://youtu.be/lhELGQAV4gg)
- [Pseudocode](https://youtu.be/lhELGQAV4gg?t=715)
- [Introduction to Java](https://youtu.be/4EP8YzcN0hQ)
- [Introduction](https://youtu.be/4EP8YzcN0hQ)
- [How it works](https://youtu.be/4EP8YzcN0hQ?t=93)
- [Setup Installation](https://youtu.be/4EP8YzcN0hQ?t=1486)
- [Input and Output in Java](https://youtu.be/TAtrPoaJ7gc)
- [Conditionals & Loops in Java](https://youtu.be/ldYLYRNaucM?t=88)
- [if-else](https://youtu.be/ldYLYRNaucM?t=88)
- [loops](https://youtu.be/ldYLYRNaucM?t=440)
- [Switch statements](https://youtu.be/mA23x39DjbI)
- [Data-types](https://youtu.be/TAtrPoaJ7gc?t=2800)
- [Coding best practices](https://youtu.be/waGfV-IoOt8)
- [Functions](https://youtu.be/vvanI8NRlSI)
- [Introduction](https://youtu.be/vvanI8NRlSI)
- [Scoping in Java](https://youtu.be/vvanI8NRlSI?t=2801)
- [Shadowing](https://youtu.be/vvanI8NRlSI?t=3584)
- [Variable Length Arguments](https://youtu.be/vvanI8NRlSI?t=4013)
- [Overloading](https://youtu.be/vvanI8NRlSI?t=4327)
- [Arrays](https://youtu.be/n60Dn0UsbEk)
- [Introduction](https://youtu.be/n60Dn0UsbEk)
- [Memory management](https://youtu.be/n60Dn0UsbEk?t=632)
- [Input and Output](https://youtu.be/n60Dn0UsbEk?t=1675)
- [ArrayList Introduction](https://youtu.be/n60Dn0UsbEk?t=4868)
- Searching
- [Linear Search](https://youtu.be/_HRA37X8N_Q)
- [Binary Search](https://youtu.be/f6UU7V3szVw)
- [Modified Binary Search](https://youtu.be/f6UU7V3szVw?t=2508)
- [Binary Search on 2D Arrays](https://www.youtube.com/watch?v=enI_KyGLYPo)
- Sorting
- [Insertion Sort](https://youtu.be/By_5-RRqVeE)
- [Selection Sort](https://youtu.be/Nd4SCCIHFWk)
- [Bubble Sort](https://youtu.be/F5MZyqRp_IM)
- [Cyclic Sort](https://youtu.be/JfinxytTYFQ)
- [Count Sort](https://youtu.be/FOo820lJV1Y)
- [Radix Sort](https://youtu.be/mLi6VQDqAOs)
- [Pattern questions](https://youtu.be/lsOOs5J8ycw)
- [Strings](https://www.youtube.com/watch?v=zL1DPZ0Ovlo)
- [Introduction](https://www.youtube.com/watch?v=zL1DPZ0Ovlo)
- [How Strings work](https://youtu.be/zL1DPZ0Ovlo?t=216)
- [Comparison of methods](https://youtu.be/zL1DPZ0Ovlo?t=977)
- [Operations in Strings](https://youtu.be/zL1DPZ0Ovlo?t=1681)
- [StringBuilder in Java](https://youtu.be/zL1DPZ0Ovlo?t=4199)
- [StringBuffer](https://www.youtube.com/watch?v=YFZai3fPUQI)
- [Maths for DSA](https://youtu.be/fzip9Aml6og)
- [Introduction](https://youtu.be/fzip9Aml6og?t=20)
- [Complete Bitwise Operators](https://youtu.be/fzip9Aml6og?t=95)
- [Range of numbers](https://youtu.be/fzip9Aml6og?t=4169)
- [Prime numbers](https://youtu.be/lmSpZ0bjCyQ?t=57)
- [Sieve of Eratosthenes](https://youtu.be/lmSpZ0bjCyQ?t=850)
- [Newton's Square Root Method](https://youtu.be/lmSpZ0bjCyQ?t=1989)
- [Factors](https://youtu.be/lmSpZ0bjCyQ?t=3004)
- [Modulo properties](https://youtu.be/lmSpZ0bjCyQ?t=3980)
- [Number Theory](https://youtu.be/lmSpZ0bjCyQ?t=4405)
- [HCF / LCM](https://youtu.be/lmSpZ0bjCyQ?t=5110)
- [Euclidean algorithm](https://youtu.be/lmSpZ0bjCyQ?t=5520)
- [BigInteger & BigDecimal](https://www.youtube.com/watch?v=lHtoypC-4Ps)
- [Recursion](https://www.youtube.com/playlist?list=PL9gnSGHSqcnp39cTyB1dTZ2pJ04Xmdrod)
- [Introduction](https://youtu.be/M2uO2nMT0Bk)
- [Flow of recursive programs - stacks](https://youtu.be/M2uO2nMT0Bk?t=2124)
- [Why recursion?](https://youtu.be/M2uO2nMT0Bk?t=2708)
- [Tree building of function calls](https://youtu.be/M2uO2nMT0Bk?t=3033)
- [Tail recursion](https://youtu.be/M2uO2nMT0Bk?t=4308)
- [Sorting](https://www.youtube.com/playlist?list=PL9gnSGHSqcnq-9CXLt9DsInytRMLoyZQ_)
- [Merge Sort](https://youtu.be/iKGAgWdgoRk)
- [Quick Sort](https://www.youtube.com/watch?v=Z8svOqamag8&list=PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ&index=27)
- [Backtracking](https://youtu.be/zg5v2rlV1tM)
- [N-Queens](https://youtu.be/nC1rbW2YSz0)
- [N-Knights](https://youtu.be/nC1rbW2YSz0?t=2342)
- [Sudoku Solver](https://youtu.be/nC1rbW2YSz0?t=3190)
- [Maze problems](https://www.youtube.com/watch?v=zg5v2rlV1tM)
- [Recursion String Problems](https://youtu.be/gdifkIwCJyg)
- [Recursion Google, Amazon Questions](https://youtu.be/9ByWqPzfXDU)
- [Recursion Array Problems](https://youtu.be/sTdiMLom00U)
- [Recursion Pattern Problems](https://youtu.be/ymgnIIclCF0)
- [Subset Questions](https://youtu.be/9ByWqPzfXDU)
- [Space and Time Complexity Analysis](https://youtu.be/mV3wrLBbuuE)
- [Introduction](https://youtu.be/mV3wrLBbuuE)
- [Comparisons of various cases](https://youtu.be/mV3wrLBbuuE?t=1039)
- [Solving Linear Recurrence Relations](https://youtu.be/mV3wrLBbuuE?t=6252)
- [Solving Divide and Conquer Recurrence Relations](https://youtu.be/mV3wrLBbuuE?t=4609)
- [Big-O, Big-Omega, Big-Theta Notations](https://youtu.be/mV3wrLBbuuE?t=2271)
- [Little Notations](https://youtu.be/mV3wrLBbuuE?t=2960)
- [Get equation of any relation easily - best and easiest approach](https://youtu.be/mV3wrLBbuuE?t=8189)
- [Complexity discussion of all the problems we do](https://youtu.be/mV3wrLBbuuE?t=3866)
- [Space Complexity](https://youtu.be/mV3wrLBbuuE?t=3330)
- [NP-Completeness Introduction](https://youtu.be/mV3wrLBbuuE?t=8695)
- [Object Oriented Programming](https://www.youtube.com/playlist?list=PL9gnSGHSqcno1G3XjUbwzXHL8_EttOuKk)
- [Introduction](https://www.youtube.com/watch?v=BSVKUk58K6U)
- [Classes & its instances](https://youtu.be/BSVKUk58K6U?t=467)
- [this keyword in Java](https://youtu.be/BSVKUk58K6U?t=3380)
- [Properties](https://www.youtube.com/watch?v=46T2wD3IuhM)
- [Inheritance](https://youtu.be/46T2wD3IuhM?t=146)
- [Abstraction](https://youtu.be/46T2wD3IuhM?t=7102)
- [Polymorphism](https://youtu.be/46T2wD3IuhM?t=4226)
- [Encapsulation](https://youtu.be/46T2wD3IuhM?t=7022)
- [Overloading & Overriding](https://youtu.be/46T2wD3IuhM?t=4834)
- [Static & Non-Static](https://youtu.be/_Ya6CN13t8k?t=1137)
- [Packages](https://youtu.be/_Ya6CN13t8k?t=182)
- [Access Control](https://youtu.be/W145DXs8fFg)
- [Interfaces](https://youtu.be/rgHZa7-Dibg?t=1510)
- [Abstract Classes](https://youtu.be/rgHZa7-Dibg?t=68)
- [Annotations](https://youtu.be/rgHZa7-Dibg?t=3438)
- [Singleton Class](https://youtu.be/_Ya6CN13t8k?t=4240)
- [final, finalize, finally](https://youtu.be/46T2wD3IuhM?t=6317)
- [Object Cloning](https://youtu.be/OY2lPr8h93U?t=4352)
- [Object Class](https://youtu.be/W145DXs8fFg?t=1943)
- [Generics](https://www.youtube.com/watch?v=OY2lPr8h93U)
- [Exception Handling](https://youtu.be/OY2lPr8h93U?t=3405)
- [Collections Framework](https://youtu.be/9ogGan-R1pc?t=49)
- [Vector Class](https://youtu.be/9ogGan-R1pc?t=668)
- [Lambda Expression](https://youtu.be/OY2lPr8h93U?t=2894)
- [Enums](https://youtu.be/9ogGan-R1pc?t=909)
- Linked List
- [Introduction](https://youtu.be/58YbpRDc4yw)
- [Singly + Doubly + Circular LinkedList](https://youtu.be/58YbpRDc4yw)
- [Fast and slow pointer](https://youtu.be/70tx7KcMROc)
- [Cycle Detection](https://youtu.be/70tx7KcMROc)
- [Reversal of LinkedList](https://youtu.be/70tx7KcMROc)
- [Linked List + Recursion](https://youtu.be/70tx7KcMROc)
- [Stacks & Queues](https://www.youtube.com/watch?v=rHQI4mrJ3cg)
- Introduction
- Push efficient
- Pop efficient
- Queue using Stack and vice versa
- Circular Queue
- [Interview problems](https://www.youtube.com/watch?v=S9LUYztYLu4)
- [File handling](https://www.youtube.com/watch?v=b35mlSPOlJg)
- [Trees](https://www.youtube.com/playlist?list=PL9gnSGHSqcnqfctdbCQKaw5oZ9Up2cmsq)
- [Introduction](https://www.youtube.com/watch?v=4s1Tcvm00pA)
- Binary Trees
- Binary Search Trees
- [Interview questions](https://www.youtube.com/watch?v=9D-vP-jcc-Y)
- DFS
- BFS
- [AVL Trees](https://www.youtube.com/watch?v=CVA85JuJEn0)
- [Segment Tree](https://www.youtube.com/watch?v=ciHThtTVNto)
- Fenwick Tree / Binary Indexed Tree
- Heaps
- [Introduction](https://youtu.be/Qf-TDPr0nYw)
- Theory
- Priority Queue
- Heapsort
- Two Heaps Method
- k-way merge
- Top k elements
- Interval problems
- HashMap
- [Introduction](https://youtu.be/XLbvmMz8Fr8)
- Theory - how it works
- Comparisons of various forms
- Limitations and how to solve
- Map using LinkedList
- Map using Hash
- Chaining
- Probing
- [Huffman Coding](https://youtu.be/XLfgeaYHinM)
- [Karp-Rabin Strng matching algorithm](https://youtu.be/swciWFPq3NE)
- Subarray Questions: Sliding window, Two Pointer, Kadane's Algorithm
- Graphs
- Introduction
- BFS
- DFS
- Working with graph components
- Minimum Spanning Trees
- Kruskal Algorithm
- Prims Algorithm
- Dijkstra’s shortest path algorithm
- Topological Sort
- Bellman ford
- A* pathfinding Algorithm
- Dynamic Programming
- Introduction
- Recursion + Recursion DP + Iteration + Iteration Space Optimized
- Complexity Analysis
- 0/1 Knapsack
- Subset Questions
- Unbounded Knapsack
- Subsequence questions
- String DP
- Greedy Algorithms
- Tries
### Advanced concepts apart from interviews
- Bitwise + DP
- Extended Euclidean algorithm
- Modulo Multiplicative Inverse
- Linear Diophantine Equations
- Matrix Exponentiation
- Mathematical Expectation
- Catalan Numbers
- Fermat’s Theorem
- Wilson's Theorem
- Euler's Theorem
- Lucas Theorem
- Chinese Remainder Theorem
- Euler Totient
- NP-Completeness
- Multithreading
- Square Root Decomposition
================================================
FILE: assignments/01-flow-of-program.md
================================================
[Video Link](https://youtu.be/lhELGQAV4gg)
## Create flowchart and pseudocode for the following:
1. Input a year and find whether it is a leap year or not.
2. Take two numbers and print the sum of both.
3. Take a number as input and print the multiplication table for it.
4. Take 2 numbers as inputs and find their HCF and LCM.
5. Keep taking numbers as inputs till the user enters ‘x’, after that print sum of all.
================================================
FILE: assignments/02-first-java.md
================================================
# [Video Link](https://youtu.be/TAtrPoaJ7gc)
## Write Java programs for the following:
1. Write a program to print whether a number is even or odd, also take
input from the user.
2. Take name as input and print a greeting message for that particular name.
3. Write a program to input principal, time, and rate (P, T, R) from the user and
find Simple Interest.
4. Take in two numbers and an operator (+, -, *, /) and calculate the value.
(Use if conditions)
5. Take 2 numbers as input and print the largest number.
6. Input currency in rupees and output in USD.
7. To calculate Fibonacci Series up to n numbers.
8. To find out whether the given String is Palindrome or not.
9. To find Armstrong Number between two given number.
================================================
FILE: assignments/03-conditionals-loops.md
================================================
# [Video Link](https://youtu.be/ldYLYRNaucM)
## Write Java programs for the following:
### Basic Java Programs
1. Area Of Circle Java Program
2. Area Of Triangle
3. Area Of Rectangle Program
4. Area Of Isosceles Triangle
5. Area Of Parallelogram
6. Area Of Rhombus
7. Area Of Equilateral Triangle
8. Perimeter Of Circle
9. Perimeter Of Equilateral Triangle
10. Perimeter Of Parallelogram
11. Perimeter Of Rectangle
12. Perimeter Of Square
13. Perimeter Of Rhombus
14. Volume Of Cone Java Program
15. Volume Of Prism
16. Volume Of Cylinder
17. Volume Of Sphere
18. Volume Of Pyramid
19. Curved Surface Area Of Cylinder
20. Total Surface Area Of Cube
21. Fibonacci Series In Java Programs
22. [Subtract the Product and Sum of Digits of an Integer](https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/)
23. Input a number and print all the factors of that number (use loops).
24. Take integer inputs till the user enters 0 and print the sum of all numbers
(HINT: while loop)
25. Take integer inputs till the user enters 0 and print the largest number from
all.
26. Addition Of Two Numbers
### Intermediate Java Programs
1. Factorial Program In Java
2. Calculate Electricity Bill
3. Calculate Average Of N Numbers
4. Calculate Discount Of Product
5. Calculate Distance Between Two Points
6. Calculate Commission Percentage
7. Power In Java
8. Calculate Depreciation of Value
9. Calculate Batting Average
10. Calculate CGPA Java Program
11. Compound Interest Java Program
12. Calculate Average Marks
13. Sum Of N Numbers
14. Armstrong Number In Java
15. Find Ncr & Npr
16. Reverse A String In Java
17. Find if a number is palindrome or not
18. Future Investment Value
19. HCF Of Two Numbers Program
20. LCM Of Two Numbers
21. Java Program Vowel Or Consonant
22. Perfect Number In Java
23. Check Leap Year Or Not
24. Sum Of A Digits Of Number
25. Kunal is allowed to go out with his friends only on the even days of a given month. Write a program to count the number of days he can go out in the month of August.
26. Write a program to print the sum of negative numbers, sum of positive even numbers and the sum of positive odd numbers from a list of numbers (N) entered by the user. The list terminates when the user enters a zero.
================================================
FILE: assignments/04-functions.md
================================================
# [Video Link](https://youtu.be/vvanI8NRlSI)
1. [Define two methods to print the maximum and the minimum number respectively among three numbers entered by the user.](https://www.java67.com/2019/05/how-to-find-largest-and-smallest-of-three-numbers-in-java.html)
2. [Define a program to find out whether a given number is even or odd.](https://www.geeksforgeeks.org/java-program-to-check-if-a-given-integer-is-odd-or-even/)
3. [A person is eligible to vote if his/her age is greater than or equal to 18. Define a method to find out if he/she is eligible to vote.](https://www.efaculty.in/java-programs/voting-age-program-in-java/)
4. [Write a program to print the sum of two numbers entered by user by defining your own method.](https://code4coding.com/addition-of-two-numbers-in-java-using-method/)
5. [Define a method that returns the product of two numbers entered by user.](https://code4coding.com/java-program-to-multiply-two-numbers-using-method/)
6. [Write a program to print the circumference and area of a circle of radius entered by user by defining your own method.](https://beginnersbook.com/2014/01/java-program-to-calculate-area-and-circumference-of-circle/)
7. [Define a method to find out if a number is prime or not.](https://www.geeksforgeeks.org/java-program-to-check-if-a-number-is-prime-or-not/)
8. [Write a program that will ask the user to enter his/her marks (out of 100). Define a method that will display grades according to the marks entered as below:](https://www.techcrashcourse.com/2017/02/java-program-to-calculate-grade-of-students.html) <br/>
<pre>
Marks Grade
91-100 AA
81-90 AB
71-80 BB
61-70 BC
51-60 CD
41-50 DD
<=40 Fail
</pre>
9. [Write a program to print the factorial of a number by defining a method named 'Factorial'.](https://www.javatpoint.com/factorial-program-in-java)
Factorial of any number n is represented by n! and is equal to 1 * 2 * 3 * .... * (n-1) *n. E.g.- <br/>
<pre>
4! = 1 * 2 * 3 * 4 = 24
3! = 3 * 2 * 1 = 6
2! = 2 * 1 = 2
Also,
1! = 1
0! = 1
</pre>
10. [Write a function to find if a number is a palindrome or not. Take number as parameter.](https://www.geeksforgeeks.org/check-if-a-number-is-palindrome/)
11. Convert the programs in [flow of program](01-flow-of-program.md), [first java](02-first-java.md), [conditionals & loops](03-conditionals-loops.md) assignments into functions.
12. [Write a function to check if a given triplet is a Pythagorean triplet or not.](https://www.geeksforgeeks.org/find-pythagorean-triplet-in-an-unsorted-array/) (A Pythagorean triplet is when the sum of the square of two numbers is equal to the square of the third number).
13. [Write a function that returns all prime numbers between two given numbers.](https://www.geeksforgeeks.org/program-to-find-prime-numbers-between-given-interval/)
14. [Write a function that returns the sum of first n natural numbers.](https://www.geeksforgeeks.org/program-find-sum-first-n-natural-numbers/)
================================================
FILE: assignments/05-arrays.md
================================================
# [Video Link](https://youtu.be/n60Dn0UsbEk)
## Submit the following on your Leetcode profile itself.
### Easy
1. [Build Array from Permutation](https://leetcode.com/problems/build-array-from-permutation/)
2. [Concatenation of Array](https://leetcode.com/problems/concatenation-of-array/)
3. [Running Sum of 1d Array](https://leetcode.com/problems/running-sum-of-1d-array/)
4. [Richest Customer Wealth](https://leetcode.com/problems/richest-customer-wealth/)
5. [Shuffle the Array](https://leetcode.com/problems/shuffle-the-array/)
6. [Kids With the Greatest Number of Candies](https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/)
7. [Number of Good Pairs](https://leetcode.com/problems/number-of-good-pairs/)
8. [How Many Numbers Are Smaller Than the Current Number](https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number/)
9. [Create Target Array in the Given Order](https://leetcode.com/problems/create-target-array-in-the-given-order/)
10. [Check if the Sentence Is Pangram](https://leetcode.com/problems/check-if-the-sentence-is-pangram/)
11. [Count Items Matching a Rule](https://leetcode.com/problems/count-items-matching-a-rule/)
12. [Find the Highest Altitude](https://leetcode.com/problems/find-the-highest-altitude/)
13. [Flipping an Image](https://leetcode.com/problems/flipping-an-image/)
14. [Cells with Odd Values in a Matrix](https://leetcode.com/problems/cells-with-odd-values-in-a-matrix/)
15. [Matrix Diagonal Sum](https://leetcode.com/problems/matrix-diagonal-sum/)
16. [Find Numbers with Even Number of Digits](https://leetcode.com/problems/find-numbers-with-even-number-of-digits/)
17. [Transpose Matrix](https://leetcode.com/problems/transpose-matrix/)
18. [Add to Array-Form of Integer](https://leetcode.com/problems/add-to-array-form-of-integer/)
19. [Maximum Population Year](https://leetcode.com/problems/maximum-population-year/)
20. [Determine Whether Matrix Can Be Obtained By Rotation](https://leetcode.com/problems/determine-whether-matrix-can-be-obtained-by-rotation/)
21. [Two Sum](https://leetcode.com/problems/two-sum/)
22. [Find N Unique Integers Sum up to Zero](https://leetcode.com/problems/find-n-unique-integers-sum-up-to-zero/)
23. [Lucky Number In a Matrix](https://leetcode.com/problems/lucky-numbers-in-a-matrix/)
24. [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/)
25. [Reshape the Matrix](https://leetcode.com/problems/reshape-the-matrix/)
26. [Plus One](https://leetcode.com/problems/plus-one/)
27. [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/)
28. [Minimum Cost to Move Chips to The Same Position](https://leetcode.com/problems/minimum-cost-to-move-chips-to-the-same-position/)
### Medium
1. [Spiral Matrix](https://leetcode.com/problems/spiral-matrix/)
2. [Spiral Matrix II](https://leetcode.com/problems/spiral-matrix-ii/)
3. [Spiral Matrix III](https://leetcode.com/problems/spiral-matrix-iii/)
4. [Set Matrix Zeroes](https://leetcode.com/problems/set-matrix-zeroes/)
5. [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/)
6. [Find First and Last Position of Element in Sorted Array](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/)
7. [Jump Game](https://leetcode.com/problems/jump-game/)
8. [Rotate Array](https://leetcode.com/problems/rotate-array/)
9. [Sort Colors](https://leetcode.com/problems/sort-colors/)
10. [House Robber](https://leetcode.com/problems/house-robber/)
### Hard
1. [Max Value of Equation](https://leetcode.com/problems/max-value-of-equation/)
2. [First Missing Positive](https://leetcode.com/problems/first-missing-positive/)
3. [Good Array](https://leetcode.com/problems/check-if-it-is-a-good-array/)
================================================
FILE: assignments/06-searching.md
================================================
# Videos:
- [Linear Search](https://youtu.be/_HRA37X8N_Q)
- [Binary Search](https://youtu.be/f6UU7V3szVw)
- [Binary Search Questions](https://youtu.be/W9QJ8HaRvJQ)
- [Binary Search in 2D Arrays](https://youtu.be/enI_KyGLYPo)
# Problems:
## Easy
- [Square Root](https://leetcode.com/problems/sqrtx/)
- [Guess Number Higher or Lower](https://leetcode.com/problems/guess-number-higher-or-lower/)
- [First Bad Version](https://leetcode.com/problems/first-bad-version/)
- [Two Sum II - Input array is sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/)
- [Valid Perfect Square](https://leetcode.com/problems/valid-perfect-square/)
- [Arranging Coins(Easy)](https://leetcode.com/problems/arranging-coins/)
- [Find Smallest Letter Greater Than Target](https://leetcode.com/problems/find-smallest-letter-greater-than-target/)
- [Kth Missing Positive Number](https://leetcode.com/problems/kth-missing-positive-number/)
- [Search Insert Position](https://leetcode.com/problems/search-insert-position/)
- [Peak Index in a Mountain Array](https://leetcode.com/problems/peak-index-in-a-mountain-array/)
- [Count Negative Numbers in a Sorted Matrix](https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix/)
- [Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/)
- [Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/)
- [Fair Candy Swap](https://leetcode.com/problems/fair-candy-swap/)
- [Check If N and Its Double Exist](https://leetcode.com/problems/check-if-n-and-its-double-exist/)
- [Special Array With X Elements Greater Than or Equal X](https://leetcode.com/problems/special-array-with-x-elements-greater-than-or-equal-x/)
- [Binary Search](https://leetcode.com/problems/binary-search/)
## Medium
- [Find First and Last Position of Element in Sorted Array](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/)
- [Single Element in a Sorted Array](https://leetcode.com/problems/single-element-in-a-sorted-array/)
- [Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/)
- [Search in Rotated Sorted Array II](https://leetcode.com/problems/search-in-rotated-sorted-array-ii/)
- [Find Minimum in Rotated Sorted Array](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/)
- [Find Peak Element](https://leetcode.com/problems/find-peak-element/)
- [Find Right Interval](https://leetcode.com/problems/find-right-interval/)
- [Reach a Number](https://leetcode.com/problems/reach-a-number/)
- [Maximum Value at a Given Index in a Bounded Array](https://leetcode.com/problems/maximum-value-at-a-given-index-in-a-bounded-array/)
- [Koko Eating Bananas](https://leetcode.com/problems/koko-eating-bananas/)
- [Minimum Absolute Sum Difference](https://leetcode.com/problems/minimum-absolute-sum-difference/)
- [Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix/)
- [Find a Peak Element II](https://leetcode.com/problems/find-a-peak-element-ii/)
- [Frequency of the Most Frequent Element](https://leetcode.com/problems/frequency-of-the-most-frequent-element/)
- [Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/)
- [Capacity To Ship Packages Within D Days](https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/)
- [4 Sum](https://leetcode.com/problems/4sum/)
## Hard
- [Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays/)
- [Find Minimum in Rotated Sorted Array II](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/)
- [Aggressive cows](https://www.spoj.com/problems/AGGRCOW/)
- [Book allocation](https://www.geeksforgeeks.org/allocate-minimum-number-pages/)
- [Split Array Largest Sum](https://leetcode.com/problems/split-array-largest-sum/)
- [Find in Mountain Array](https://leetcode.com/problems/find-in-mountain-array/)
- [Count smaller number after Self](https://leetcode.com/problems/count-of-smaller-numbers-after-self/)
- [Divide Chocolate Problem](https://curiouschild.github.io/leetcode/2019/06/21/divide-chocolate.html)
================================================
FILE: assignments/07-sorting.md
================================================
# Videos
- [Bubble Sort](https://youtu.be/F5MZyqRp_IM)
- [Selection Sort](https://youtu.be/Nd4SCCIHFWk)
- [Insertion Sort](https://youtu.be/By_5-RRqVeE)
- [Cycle Sort](https://www.youtube.com/watch?v=JfinxytTYFQ&list=RDCMUCBGOUQHNNtNGcGzVq5rIXjw&start_radio=1&rv=JfinxytTYFQ&t=2)
- [Merge Sort](https://youtu.be/iKGAgWdgoRk)
- [Quick Sort](https://youtu.be/Z8svOqamag8)
# Questions
## Easy
- [Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array/)
- [Majority Element](https://leetcode.com/problems/majority-element/)
- [Contains Duplicate](https://leetcode.com/problems/contains-duplicate/)
- [Missing Number](https://leetcode.com/problems/missing-number/)
- [Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/)
- [Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/)
- [Third Maximum Number](https://leetcode.com/problems/third-maximum-number/)
- [Assign Cookies](https://leetcode.com/problems/assign-cookies/)
- [Array Partition I](https://leetcode.com/problems/array-partition-i/)
- [Maximum Product of Three Numbers](https://leetcode.com/problems/maximum-product-of-three-numbers/)
- [Sort Array By Parity](https://leetcode.com/problems/sort-array-by-parity/)
- [Sort Array By Parity II](https://leetcode.com/problems/sort-array-by-parity-ii/)
- [Largest Perimeter Triangle](https://leetcode.com/problems/largest-perimeter-triangle/)
- [Squares of a Sorted Array](https://leetcode.com/problems/squares-of-a-sorted-array/)
- [Matrix Cells in Distance Order](https://leetcode.com/problems/matrix-cells-in-distance-order/)
- [Height Checker](https://leetcode.com/problems/height-checker/)
- [Relative Sort Array](https://leetcode.com/problems/relative-sort-array/)
- [Minimum Absolute Difference](https://leetcode.com/problems/minimum-absolute-difference/)
- [Rank Transform of an Array](https://leetcode.com/problems/rank-transform-of-an-array/)
- [Sort Integers by The Number of 1 Bits](https://leetcode.com/problems/sort-integers-by-the-number-of-1-bits/)
- [How Many Numbers Are Smaller Than the Current Number](https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number/)
- [Maximum Product of Two Elements in an Array](https://leetcode.com/problems/maximum-product-of-two-elements-in-an-array/)
- [Average Salary Excluding the Minimum and Maximum Salary](https://leetcode.com/problems/average-salary-excluding-the-minimum-and-maximum-salary/)
- [Make Two Arrays Equal by Reversing Sub-arrays](https://leetcode.com/problems/make-two-arrays-equal-by-reversing-sub-arrays/)
- [Can Make Arithmetic Progression From Sequence](https://leetcode.com/problems/can-make-arithmetic-progression-from-sequence/)
- [Sort Array by Increasing Frequency](https://leetcode.com/problems/sort-array-by-increasing-frequency/)
- [Special Array With X Elements Greater Than or Equal X](https://leetcode.com/problems/special-array-with-x-elements-greater-than-or-equal-x/)
- [Find all numbers disappeared in an array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/)
- [Set Mismatch](https://leetcode.com/problems/set-mismatch/)
- [2Sum](https://leetcode.com/problems/two-sum/)
## Medium
- [3Sum](https://leetcode.com/problems/3sum/)
- [3Sum Closest](https://leetcode.com/problems/3sum-closest/)
- [4Sum](https://leetcode.com/problems/4sum/)
- [Group Anagrams](https://leetcode.com/problems/group-anagrams/)
- [Merge Intervals](https://leetcode.com/problems/merge-intervals/)
- [Sort Colors](https://leetcode.com/problems/sort-colors/)
- [Insertion Sort List](https://leetcode.com/problems/insertion-sort-list/)
- [Sort List](https://leetcode.com/problems/sort-list/)
- [Largest Number](https://leetcode.com/problems/largest-number/)
- [Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-array/)
- [Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/)
- [Find all Duplicates in an array](https://leetcode.com/problems/find-all-duplicates-in-an-array/)
## Hard
- [First missing Positive](https://leetcode.com/problems/first-missing-positive/)
================================================
FILE: assignments/08-strings.md
================================================
# [Video Link](https://youtu.be/zL1DPZ0Ovlo)
# Problems
## Easy
- [Defanging an Ip address](https://leetcode.com/problems/defanging-an-ip-address/)
- [Shuffle String](https://leetcode.com/problems/shuffle-string/)
- [Goal Parser Interpretation](https://leetcode.com/problems/goal-parser-interpretation/)
- [Count Items Matching a rule](https://leetcode.com/problems/count-items-matching-a-rule/)
- [Sorting the Sentence](https://leetcode.com/problems/sorting-the-sentence/)
- [Check if two strings are equivalent](https://leetcode.com/problems/check-if-two-string-arrays-are-equivalent/)
- [To Lower Case](https://leetcode.com/problems/to-lower-case/)
- [Determine if string halves are alike](https://leetcode.com/problems/determine-if-string-halves-are-alike/)
- [Decrypt String from Alphabet to Integer Mapping](https://leetcode.com/problems/decrypt-string-from-alphabet-to-integer-mapping/)
- [Number of Strings That Appear as Substrings in Word](https://leetcode.com/problems/number-of-strings-that-appear-as-substrings-in-word/)
- [Robot Return to Origin](https://leetcode.com/problems/robot-return-to-origin/)
- [Reverse Words in a String III](https://leetcode.com/problems/reverse-words-in-a-string-iii/)
- [Excel Sheet Column Title](https://leetcode.com/problems/excel-sheet-column-title/)
- [Implement strStr()](https://leetcode.com/problems/implement-strstr/)
- [Long Pressed Name](https://leetcode.com/problems/long-pressed-name/)
- [Valid Palindrome](https://leetcode.com/problems/valid-palindrome/)
- [Valid Palindrome II](https://leetcode.com/problems/valid-palindrome-ii/)
- [Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/)
- [Maximum Repeating Substring](https://leetcode.com/problems/maximum-repeating-substring/)
- [Check if Binary String Has at Most One Segment of Ones](https://leetcode.com/problems/check-if-binary-string-has-at-most-one-segment-of-ones/)
- [Merge Strings Alternately](https://leetcode.com/problems/merge-strings-alternately/)
- [Reverse Prefix of Word](https://leetcode.com/problems/reverse-prefix-of-word/)
- [Roman to Integer](https://leetcode.com/problems/roman-to-integer/)
- [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/)
- [Length of last word](https://leetcode.com/problems/length-of-last-word/)
## Medium
- [Jump Game VII](https://leetcode.com/problems/jump-game-vii/)
- [Split Two Strings to Make Palindrome](https://leetcode.com/problems/split-two-strings-to-make-palindrome/)
- [Number of Ways to Split a String](https://leetcode.com/problems/number-of-ways-to-split-a-string/)
- [Sentence Similarity III](https://leetcode.com/problems/sentence-similarity-iii/)
- [Repeated String Match](https://leetcode.com/problems/repeated-string-match/)
- [Next Greater Element III](https://leetcode.com/problems/next-greater-element-iii/)
- [Maximum Number of Removable Characters](https://leetcode.com/problems/maximum-number-of-removable-characters/)
- [Swap Adjacent in LR String](https://leetcode.com/problems/swap-adjacent-in-lr-string/)
- [Multiply Strings](https://leetcode.com/problems/multiply-strings/)
- [Basic Calculator II](https://leetcode.com/problems/basic-calculator-ii/)
- [Minimum Length of String After Deleting Similar Ends](https://leetcode.com/problems/minimum-length-of-string-after-deleting-similar-ends/)
- [Number of Substrings With Only 1s](https://leetcode.com/problems/number-of-substrings-with-only-1s/)
- [Count Number of Homogenous Substrings](https://leetcode.com/problems/count-number-of-homogenous-substrings/)
- [Get Equal Substrings Within Budget](https://leetcode.com/problems/get-equal-substrings-within-budget/)
- [Shifting Letters](https://leetcode.com/problems/shifting-letters/)
- [Minimum Time Difference](https://leetcode.com/problems/minimum-time-difference/)
- [Find Kth Bit in Nth Binary String](https://leetcode.com/problems/find-kth-bit-in-nth-binary-string/)
- [Camelcase Matching](https://leetcode.com/problems/camelcase-matching/)
- [Print Words Vertically](https://leetcode.com/problems/print-words-vertically/)
## Hard
- [Valid Number](https://leetcode.com/problems/valid-number/)
- [Regular Expression Matching](https://leetcode.com/problems/regular-expression-matching/)
- [Last Substring in Lexicographical Order](https://leetcode.com/problems/last-substring-in-lexicographical-order/)
- [Basic Calculator](https://leetcode.com/problems/basic-calculator/)
- [Minimum Number of Operations to Make String Sorted](https://leetcode.com/problems/minimum-number-of-operations-to-make-string-sorted/)
- [Check If String Is Transformable With Substring Sort Operations](https://leetcode.com/problems/check-if-string-is-transformable-with-substring-sort-operations/)
- [Orderly Queue](https://leetcode.com/problems/orderly-queue/)
- [Special Binary String](https://leetcode.com/problems/special-binary-string/)
# Additionally
- [Click "Show problem tags" and do questions that have tags for things we have learnt so far only.](https://leetcode.com/tag/string/)
================================================
FILE: assignments/09-patterns.md
================================================
Pattern Questions
Print these patterns using loops:
```text
1. *****
*****
*****
*****
*****
2. *
**
***
****
*****
3. *****
****
***
**
*
4. 1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
5. *
**
***
****
*****
****
***
**
*
6. *
**
***
****
*****
7. *****
****
***
**
*
8. *
***
*****
*******
*********
9. *********
*******
*****
***
*
10. *
* *
* * *
* * * *
* * * * *
11. * * * * *
* * * *
* * *
* *
*
12. * * * * *
* * * *
* * *
* *
*
*
* *
* * *
* * * *
* * * * *
13. *
* *
* *
* *
*********
14. *********
* *
* *
* *
*
15. *
* *
* *
* *
* *
* *
* *
* *
*
16. 1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
17. 1
212
32123
4321234
32123
212
1
18. **********
**** ****
*** ***
** **
* *
* *
** **
*** ***
**** ****
**********
19. * *
** **
*** ***
**** ****
**********
**** ****
*** ***
** **
* *
20. ****
* *
* *
* *
****
21. 1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
22. 1
0 1
1 0 1
0 1 0 1
1 0 1 0 1
23. * *
* * * *
* * *
24. * *
** **
* * * *
* * * *
* ** *
* ** *
* * * *
* * * *
** **
* *
25. *****
* *
* *
* *
*****
26. 1 1 1 1 1 1
2 2 2 2 2
3 3 3 3
4 4 4
5 5
6
27. 1 2 3 4 17 18 19 20
5 6 7 14 15 16
8 9 12 13
10 11
28. *
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
29.
* *
** **
*** ***
**** ****
**********
**** ****
*** ***
** **
* *
30. 1
2 1 2
3 2 1 2 3
4 3 2 1 2 3 4
5 4 3 2 1 2 3 4 5
31. 4 4 4 4 4 4 4
4 3 3 3 3 3 4
4 3 2 2 2 3 4
4 3 2 1 2 3 4
4 3 2 2 2 3 4
4 3 3 3 3 3 4
4 4 4 4 4 4 4
32. E
D E
C D E
B C D E
A B C D E
33. a
B c
D e F
g H i J
k L m N o
34. E D C B A
D C B A
C B A
B A
A
35. 1 1
12 21
123 321
12344321
```
================================================
FILE: assignments/10-recursion.md
================================================
# Videos
- [Complete Recursion Course](https://www.youtube.com/playlist?list=PL9gnSGHSqcnp39cTyB1dTZ2pJ04Xmdrod)
# Problems
## Easy
- [Sum Triangle from Array](https://www.geeksforgeeks.org/sum-triangle-from-array/) `GFG`
- [Maximum and Minimum value in an array](https://www.geeksforgeeks.org/recursive-programs-to-find-minimum-and-maximum-elements-of-array/) `GFG`
- [Binary Search using recursion](https://leetcode.com/problems/binary-search/) `leetcode`
- [First Uppercase Letter in a String](https://www.geeksforgeeks.org/first-uppercase-letter-in-a-string-iterative-and-recursive/) `GFG`
- [Reverse String](https://leetcode.com/problems/reverse-string/) `leetcode`
- [Print 1 To N Without Loop](https://practice.geeksforgeeks.org/problems/print-1-to-n-without-using-loops-1587115620/1/) `GFG`
- [Fibonacci Number](https://leetcode.com/problems/fibonacci-number/) `leetcode`
- [Special Fibonacci](https://www.codechef.com/problems/FIBXOR01/) `CodeChef`
- [Length of string using Recursion](https://www.geeksforgeeks.org/program-for-length-of-a-string-using-recursion/) `GFG`
- [Geek-onacci Number](https://practice.geeksforgeeks.org/problems/geek-onacci-number/0/) `GFG`
- [Recursive Bubble Sort](https://www.geeksforgeeks.org/recursive-bubble-sort/) `GFG`
- [Recursive Insertion Sort](https://www.geeksforgeeks.org/recursive-insertion-sort/) `GFG`
- [Sum of digit of a number using Recursion](https://www.geeksforgeeks.org/sum-digit-number-using-recursion/) `GFG`
- [Product of two numbers using Recursion](https://www.geeksforgeeks.org/product-2-numbers-using-recursion/) `GFG`
- [Check Prime or not](https://www.geeksforgeeks.org/recursive-program-prime-number/) `GFG`
- [Sum of Natural numbers using Recursion](https://www.geeksforgeeks.org/sum-of-natural-numbers-using-recursion/) `GFG`
- [Power of Two](https://leetcode.com/problems/power-of-two/) `leetcode`
- [Power of Three](https://leetcode.com/problems/power-of-three/) `leetcode`
- [Power of Four](https://leetcode.com/problems/power-of-four/) `leetcode`
- Write a recursive function for given n and a to determine x:
```java
n = a ^ x
a = 2, 3, 4
(2 ^ -31) <= n <= (2 ^ 31) - 1
```
- [Write a recursive function that returns the factorial of a number.](https://www.hackerrank.com/challenges/30-recursion/problem) `HackerRank`
- [Write a recursive function to check whether an array is sorted or not.](https://www.geeksforgeeks.org/program-check-array-sorted-not-iterative-recursive) `GFG`
- [Number of Steps to Reduce a Number to Zero.](https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/) `leetcode`
- [Check for balanced paranthesis using recursion without stack.](https://www.geeksforgeeks.org/check-for-balanced-parenthesis-without-using-stack/) `GFG`
- [Remove consecutive duplicate characters from a string.](https://www.geeksforgeeks.org/remove-consecutive-duplicates-string/) `GFG`
- [Print all possible palindromic partitions of a string.](https://www.geeksforgeeks.org/given-a-string-print-all-possible-palindromic-partition/) `GFG`
- [Power Set of permutations of a string in Lexicographic order.](https://www.geeksforgeeks.org/powet-set-lexicographic-order/) `GFG`
## Medium
- [Combination Sum](https://leetcode.com/problems/combination-sum/) `leetcode`
- [Word Search](https://leetcode.com/problems/word-search/) `leetcode`
- [Target sum](https://leetcode.com/problems/target-sum/) `leetcode`
- [Find Kth Bit in Nth Binary String](https://leetcode.com/problems/find-kth-bit-in-nth-binary-string/) `leetcode`
- [K-th Symbol in Grammar](https://leetcode.com/problems/k-th-symbol-in-grammar/) `leetcode`
- [Count Good Numbers](https://leetcode.com/problems/count-good-numbers/) `leetcode`
- [N Digit numbers with digits in increasing order](https://practice.geeksforgeeks.org/problems/n-digit-numbers-with-digits-in-increasing-order5903/1/) `GFG`
- [Pow(x, n)](https://leetcode.com/problems/powx-n/) `leetcode`
- [Minimum Non-Zero Product of the Array Elements](https://leetcode.com/problems/minimum-non-zero-product-of-the-array-elements/) `leetcode`
- [Handshakes](https://practice.geeksforgeeks.org/problems/handshakes1303/1/) `GFG`
- [HackerRank](https://www.hackerrank.com/domains/algorithms?filters%5Bsubdomains%5D%5B%5D=recursion&filters%5Bdifficulty%5D%5B%5D=medium)
- [Divisible Subset](https://www.codechef.com/problems/DIVSUBS) `Codechef`
- [Perfect squares](https://leetcode.com/problems/perfect-squares/)`leetcode`
- [decode string](https://leetcode.com/problems/decode-string/)`leetcode`
- [find the winner of the circular game](https://leetcode.com/problems/find-the-winner-of-the-circular-game/) `leetcode`
- [Different ways to add parantheses in the expression](https://leetcode.com/problems/different-ways-to-add-parentheses/) `leetcode`
- [Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number/) `leetcode`
- [Predict the winner.](https://leetcode.com/problems/predict-the-winner/) `leetcode`
- [Gray code](https://practice.geeksforgeeks.org/problems/gray-code-1611215248/1/) `GFG` `Google`
- [Combination Sum II](https://leetcode.com/problems/combination-sum-ii/) `leetcode`
- [combination Sum III](https://leetcode.com/problems/combination-sum-iii/) `leetcode`
- [Sudoku Solver](https://leetcode.com/problems/sudoku-solver/) `leetcode`
- [Letter tile possibilities](https://leetcode.com/problems/letter-tile-possibilities/) `leetcode`
- [All Paths From Source to Target](https://leetcode.com/problems/all-paths-from-source-to-target/) `leetcode`
- [Sort a stack using recursion](https://www.geeksforgeeks.org/sort-a-stack-using-recursion/) `GFG`
- [Reverse a stack using recursion](https://www.geeksforgeeks.org/reverse-a-stack-using-recursion/) `GFG`
- [Beautiful Arrangement](https://leetcode.com/problems/beautiful-arrangement/) `leetcode`
- [Lowest Common Ancestor of a Binary Tree](https://practice.geeksforgeeks.org/problems/lowest-common-ancestor-in-a-binary-tree/1/) `GFG` `Amex`
- [Prime numbers after prime P with sum S](https://www.geeksforgeeks.org/prime-numbers-after-prime-p-with-sum-s/) `GFG`
- [Path with Maximum Gold](https://leetcode.com/problems/path-with-maximum-gold/) `leetcode`
- [Longest Possible Route in a Matrix with Hurdles](https://www.geeksforgeeks.org/longest-possible-route-in-a-matrix-with-hurdles/) `GFG`
- [Tug of war](https://www.geeksforgeeks.org/tug-of-war/) `GFG` `Adobe`
- [Rat in a maze](https://www.geeksforgeeks.org/rat-in-a-maze-backtracking-2/) `GFG`
- [Reorder List](https://leetcode.com/problems/reorder-list/) `leetcode`
## Hard
- [Parsing A Boolean Expression](https://leetcode.com/problems/parsing-a-boolean-expression/) `leetcode`
- [Special Binary String](https://leetcode.com/problems/special-binary-string/) `leetcode`
- [Permutation Sequence](https://leetcode.com/problems/permutation-sequence/) `leetcode`
- [Next Happy Number](https://practice.geeksforgeeks.org/problems/next-happy-number4538/1/) `GFG`
- [Basic Calculator](https://leetcode.com/problems/basic-calculator/) `leetcode`
- [Integer to English Words](https://leetcode.com/problems/integer-to-english-words/) `leetcode`
- [Maximize Number of Nice Divisors](https://leetcode.com/problems/maximize-number-of-nice-divisors/) `leetcode`
- [N Queens](https://leetcode.com/problems/n-queens/) `leetcode`
- [N Queens II](https://leetcode.com/problems/n-queens-ii/) `leetcode`
- [Word break II](https://leetcode.com/problems/word-break-ii/) `leetcode` `Google`
- [Unique paths III](https://leetcode.com/problems/unique-paths-iii/) `leetcode`
- [Find shortest safe route in a path with landmines](https://www.geeksforgeeks.org/find-shortest-safe-route-in-a-path-with-landmines/) `GFG` `Google`
- [Minimum steps to destination](https://practice.geeksforgeeks.org/problems/minimum-number-of-steps-to-reach-a-given-number5234/1/) `GFG` `Amex` `Adobe`
- [Hamiltonian Cycle](https://www.geeksforgeeks.org/hamiltonian-cycle-backtracking-6/) `GFG`
- [M colorning problem](https://www.geeksforgeeks.org/m-coloring-problem-backtracking-5/) `GFG`
- [The Knight's tour](https://www.geeksforgeeks.org/the-knights-tour-problem-backtracking-1/) `GFG`
- [Maximum number possible by doing at-most K swaps](https://www.geeksforgeeks.org/find-maximum-number-possible-by-doing-at-most-k-swaps/) `GFG`
- [HackerRank](https://www.hackerrank.com/domains/algorithms?filters%5Bsubdomains%5D%5B%5D=recursion&filters%5Bdifficulty%5D%5B%5D=hard)
- [Concatenated Words](https://leetcode.com/problems/concatenated-words/)`leetcode`
================================================
FILE: assignments/11-bitwise.md
================================================
# [Video link](https://youtu.be/fzip9Aml6og)
## Problems
## Easy
- [Add Binary](https://leetcode.com/problems/add-binary/)
- [Single Number](https://leetcode.com/problems/single-number/)
- [Reverse Bits](https://leetcode.com/problems/reverse-bits/)
- [Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits/)
- [Counting Bits](https://leetcode.com/problems/counting-bits/)
- [Binary Watch](https://leetcode.com/problems/binary-watch/)
- [Hamming Distance](https://leetcode.com/problems/hamming-distance/)
- [Number Complement](https://leetcode.com/problems/number-complement/)
- [Set Mismatch](https://leetcode.com/problems/set-mismatch/)
- [Binary Number with Alternating Bits](https://leetcode.com/problems/binary-number-with-alternating-bits/)
- [Prime Number of Set Bits in Binary Representation](https://leetcode.com/problems/prime-number-of-set-bits-in-binary-representation/)
- [Binary Gap](https://leetcode.com/problems/binary-gap/)
- [Number of Steps to Reduce a Number to Zero](https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/)
- [Sort Integers by The Number of 1 Bits](https://leetcode.com/problems/sort-integers-by-the-number-of-1-bits/)
- [XOR Operation in an Array](https://leetcode.com/problems/xor-operation-in-an-array/)
- [Count the Number of Consistent Strings](https://leetcode.com/problems/count-the-number-of-consistent-strings/)
- [Decode XORed Array](https://leetcode.com/problems/decode-xored-array/)
- [Sum of All Subset XOR Totals](https://leetcode.com/problems/sum-of-all-subset-xor-totals/)
- [Longest Nice Substring](https://leetcode.com/problems/longest-nice-substring/)
## Medium
- [Subsets](https://leetcode.com/problems/subsets/)
- [Subsets II](https://leetcode.com/problems/subsets-ii/)
- [Single Number II](https://leetcode.com/problems/single-number-ii/)
- [Divide Two Integers](https://leetcode.com/problems/divide-two-integers/)
- [Gray Code](https://leetcode.com/problems/gray-code/)
- [Repeated DNA Sequences](https://leetcode.com/problems/repeated-dna-sequences/)
## Hard
- [Minimum Number of Flips to onvert Binary Matrix to zero matrix](https://leetcode.com/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix/)
- [Minimum cost to connect two group of points](https://leetcode.com/problems/minimum-cost-to-connect-two-groups-of-points/)
- [Find XOR Sum of All Pairs Bitwise AND](https://leetcode.com/problems/find-xor-sum-of-all-pairs-bitwise-and/)
# Additionally
- Click on [*Show problem tags*](https://leetcode.com/tag/bit-manipulation/) and do the questions that contains tags of topics we have covered so far.
================================================
FILE: assignments/12-math.md
================================================
# [Video link](https://youtu.be/lmSpZ0bjCyQ)
## Problems
- Click on [*Show problem tags*](https://leetcode.com/tag/math/) and do the questions that contains tags of topics we have covered so far.
## Easy
- [Roman to Integer.](https://leetcode.com/problems/roman-to-integer/)
- [Happy Number.](https://leetcode.com/problems/happy-number/)
- [Armstrong Numbers ](https://practice.geeksforgeeks.org/problems/armstrong-numbers2727/1/?category[]=Mathematical&category[]=Mathematical&page=2&query=category[]Mathematicalpage2category[]Mathematical)
- [Power of Four](https://leetcode.com/problems/power-of-four/)
- [Factorial](https://practice.geeksforgeeks.org/problems/factorial5739/1/?category[]=Mathematical&category[]=Mathematical&page=3&query=category[]Mathematicalpage3category[]Mathematical)
- [Excel Sheet Column Title](https://leetcode.com/problems/excel-sheet-column-title/)
- [Maximum Product of Three Numbers](https://leetcode.com/problems/maximum-product-of-three-numbers/)
- [Climbing Stairs](https://leetcode.com/problems/climbing-stairs/)
- [Self Dividing Numbers](https://leetcode.com/problems/self-dividing-numbers/)
- [Add Binary](https://leetcode.com/problems/add-binary/)
- [Power of Two](https://leetcode.com/problems/power-of-two/)
## Medium
- [Integer to Roman](https://leetcode.com/problems/integer-to-roman/)
- [Unique Paths](https://leetcode.com/problems/unique-paths/)
- [Gray Code](https://leetcode.com/problems/gray-code/)
- [Perfect Squares](https://leetcode.com/problems/perfect-squares/)
- [Next Greater Element III](https://leetcode.com/problems/next-greater-element-iii/)
- [Angle Between Hands of a Clock](https://leetcode.com/problems/angle-between-hands-of-a-clock/)
- [String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi/)
- [The k<sup>th</sup> Factor of n](https://leetcode.com/problems/the-kth-factor-of-n/)
- [Queries on Number of Points Inside a Circle](https://leetcode.com/problems/queries-on-number-of-points-inside-a-circle/)
- [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/)
- [Multiply Strings](https://leetcode.com/problems/multiply-strings/)
- [Encode and Decode TinyURL](https://leetcode.com/problems/encode-and-decode-tinyurl/)
- [Integer Break](https://leetcode.com/problems/integer-break/)
## Hard
- [Permutation Sequence](https://leetcode.com/problems/permutation-sequence/)
- [Basic Calculator](https://leetcode.com/problems/basic-calculator/)
- [Max Points on a Line](https://leetcode.com/problems/max-points-on-a-line/)
- [Number of Digit One](https://leetcode.com/problems/number-of-digit-one/)
================================================
FILE: assignments/13-complexities.md
================================================
<h1>Recurrence Questions:</h1>
<p align="">
<img src="https://github.com/crishabhkumar/crishabhkumar/blob/main/Extra%20images/Screenshot%20(46).png" width="322" title="hover text">
<img src="https://github.com/crishabhkumar/crishabhkumar/blob/main/Extra%20images/Screenshot%20(47).png" width="350" title="hover text">
</p>
<h1>Akra Bazzi:</h1>
<p align="">
<img src="https://github.com/crishabhkumar/crishabhkumar/blob/main/Extra%20images/Screenshot%20(48).png" width="322" title="hover text">
</p>
================================================
FILE: assignments/14-oop.md
================================================
# Important Topics
- [Kunal's notes](https://github.com/kunal-kushwaha/DSA-Bootcamp-Java/tree/main/lectures/17-oop/notes)
- [Object Oriented Paradigms](https://www.geeksforgeeks.org/object-oriented-programming-oops-concept-in-java/) `GFG`
- [Constructors in Java](https://www.geeksforgeeks.org/constructors-in-java/) `GFG`
- [Constructor chaining in Java](https://www.geeksforgeeks.org/constructor-chaining-java-examples/) `GFG`
- [Inheritance in Java](https://www.geeksforgeeks.org/inheritance-in-java/) `GFG`
- [Overriding in Java](https://www.geeksforgeeks.org/overriding-in-java/) `GFG`
- [Abstraction in Java](https://www.geeksforgeeks.org/abstraction-in-java-2/) `GFG`
- [Access modifiers in Java](https://www.geeksforgeeks.org/access-modifiers-java/) `GFG`
- [Wrapper Classes in Java](https://www.geeksforgeeks.org/wrapper-classes-java/) `GFG`
- [Need of wrapper classes in Java](https://www.geeksforgeeks.org/need-of-wrapper-classes-in-java/) `GFG`
- [this keyowrd in Java](https://www.javatpoint.com/this-keyword) `Javatpoint`
- [Important keyowrds in Java inheritance - extends,implements,super,instanceof](https://www.tutorialspoint.com/java/java_inheritance.htm) `Tutorialspoint`
- [Instance initializer block](https://www.javatpoint.com/instance-initializer-block) `Javatpoint`
- [Dynamic Method Dispatch or Runtime Polymorphism in Java](https://www.geeksforgeeks.org/dynamic-method-dispatch-runtime-polymorphism-java/) `GFG`
- [Cohesion in Java](https://www.geeksforgeeks.org/cohesion-in-java/) `GFG`
- [Coupling in Java](https://www.geeksforgeeks.org/coupling-in-java/) `GFG`
# Interview Questions
- [Can we declare main() method as private or protected or with no access modifier in java?](https://www.tutorialspoint.com/can-we-declare-main-method-as-private-or-protected-or-with-no-access-modifier-in-java) `Tutorialspoint`
- [Difference between Method Overloading and Method Overriding in Java?](https://www.geeksforgeeks.org/difference-between-method-overloading-and-method-overriding-in-java/) `GFG`
- [Can we declare interface members as private or protected in java8?](https://www.tutorialspoint.com/can-we-declare-interface-members-as-private-or-protected-in-java8) `Tutorialspoint`
- [Can we override a private or static method in Java?](https://www.tutorialspoint.com/can-we-override-a-private-or-static-method-in-java) `Tutorialspoint`
- [What is diamond problem in Java?](https://www.javatpoint.com/what-is-diamond-problem-in-java) `Javatpoint`
- [Can we pass this keyword as argument in a method call?](https://www.javatpoint.com/this-keyword#:~:text=this%3A%20to%20pass%20as%20an%20argument%20in%20the%20method) `Javatpoint`
- [Java constructor returns a value, but what?](https://www.javatpoint.com/java-constructor-returns-a-value-but-what) `Javatpoint`
- [What is covariant return type?](https://www.javatpoint.com/covariant-return-type) `Javatpoint`
- [Private classes and singleton classes in Java](https://www.geeksforgeeks.org/private-constructors-and-singleton-classes-in-java/) `GFG`
- [How to prevent Singleton Pattern from Reflection, Serialization and Cloning?](https://www.geeksforgeeks.org/prevent-singleton-pattern-reflection-serialization-cloning/) `GFG`
- [Double-Check Locking For Singleton Class](https://www.geeksforgeeks.org/java-program-to-demonstrate-the-double-check-locking-for-singleton-class/) `GFG`
# Practice Problems
- [Inheritance I](https://www.hackerrank.com/challenges/java-inheritance-1/problem?isFullScreen=true) `HackerRank`
- [Inheritance II](https://www.hackerrank.com/challenges/java-inheritance-2/problem?isFullScreen=true) `HackerRank`
- [Java Abstract class](https://www.hackerrank.com/challenges/java-abstract-class/problem?isFullScreen=true) `HackerRank`
- [Interface](https://www.hackerrank.com/challenges/java-interface/problem?isFullScreen=true) `HackerRank`
- [Method Overriding I](https://www.hackerrank.com/challenges/java-method-overriding/problem?isFullScreen=true) `HackerRank`
- [Method Overriding II (Use super keyword)](https://www.hackerrank.com/challenges/java-method-overriding-2-super-keyword/problem?isFullScreen=true) `HackerRank`
- [Java instanceof keyword](https://www.hackerrank.com/challenges/java-instanceof-keyword/problem?isFullScreen=true) `HackerRank`
- [Java Iterator](https://www.hackerrank.com/challenges/java-iterator/problem?isFullScreen=true) `HackerRank`
================================================
FILE: assignments/15-linkedlist.md
================================================
# Problems
## Easy
- [Convert Binary Number in a Linked List to Integer](https://leetcode.com/problems/convert-binary-number-in-a-linked-list-to-integer/) `leetcode`
- [Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/) `leetcode`
- [Middle of the Linked List](https://leetcode.com/problems/middle-of-the-linked-list/) `leetcode`
- [Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/) `leetcode`
- [Delete Node in a Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list/) `leetcode`
- [Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/) `leetcode` `Snapdeal`
- [Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists/) `leetcode`
- [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/) `leetcode` `Samsung`
- [Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/)`leetcode`
- [Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/) `leetcode`
- [Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/) `leetcode`
## Medium
- [Design Twitter](https://leetcode.com/problems/design-twitter/) `leetcode`
- [ Design Linked List](https://leetcode.com/problems/design-linked-list/) `leetcode`
- [Reverse Linked List II](https://leetcode.com/problems/reverse-linked-list-ii/) `leetcode`
- [Reorder List](https://leetcode.com/problems/reorder-list/) `leetcode`
- [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/) `leetcode` `HSBC`
- [Swapping Nodes in a Linked List](https://leetcode.com/problems/swapping-nodes-in-a-linked-list/) `leetcode`
- [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) `leetcode` `TCS` `Amazon` `Microsoft` `Facebook` `Qualcomm`
- [Add Two Numbers II](https://leetcode.com/problems/add-two-numbers-ii/) `leetcode`
- [Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/) `leetcode`
- [Flatten a Multilevel Doubly Linked List](https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list/) `leetcode` `Amazon`
- [Rotate List](https://leetcode.com/problems/rotate-list/) `leetcode` `Microsoft`
- [Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/) `leetcode`
- [LRU Cache](https://leetcode.com/problems/lru-cache/) `leetcode`
- [Remove Duplicates from Sorted List II](https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/) `leetcode` `Amex`
- [Design Browser History](https://leetcode.com/problems/design-browser-history/) `leetcode`
- [Partition list](https://leetcode.com/problems/partition-list/) `leetcode`
- [Find first node of loop in a linked list](https://www.geeksforgeeks.org/find-first-node-of-loop-in-a-linked-list/) `GFG`
- [Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/)`leetcode`
- [Remove Zero Sum Consecutive Nodes from Linked List](https://leetcode.com/problems/remove-zero-sum-consecutive-nodes-from-linked-list/) `leetcode`
- [Insertion Sort List](https://leetcode.com/problems/insertion-sort-list/)`leetcode`
- [ Reverse Nodes in Even Length Groups](https://leetcode.com/problems/reverse-nodes-in-even-length-groups/)`leetcode`
- [ Linked List Random Node](https://leetcode.com/problems/linked-list-random-node/)`leetcode`
- [Sort List](https://leetcode.com/problems/sort-list/)`leetcode`
- [ Merge In Between Linked Lists](https://leetcode.com/problems/merge-in-between-linked-lists/)`leetcode`
- [Design Browser History](https://leetcode.com/problems/design-browser-history/)`leetcode`
- [Delete the Middle Node of a Linked List](https://leetcode.com/problems/delete-the-middle-node-of-a-linked-list/)`leetcode`
- [Next Greater Node In Linked List](https://leetcode.com/problems/next-greater-node-in-linked-list/)`leetcode`
- [ Odd Even Linked List](https://leetcode.com/problems/odd-even-linked-list/)`leetcode`
- [Linked List Random Node](https://leetcode.com/problems/linked-list-random-node/)`leetcode`
- [Split Linked List in Parts](https://leetcode.com/problems/split-linked-list-in-parts/)`leetcode`
- [ Find the Minimum and Maximum Number of Nodes Between Critical Points](https://leetcode.com/problems/find-the-minimum-and-maximum-number-of-nodes-between-critical-points/)`leetcode`
## Hard
- [Reverse Nodes in k-Group](https://leetcode.com/problems/reverse-nodes-in-k-group/) `leetcode`
- [LFU Cache](https://leetcode.com/problems/lfu-cache/) `leetcode` `Google`
- [Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists/) `leetcode`
- [Clone a linked list with next and random pointer](https://www.geeksforgeeks.org/clone-linked-list-next-random-pointer-o1-space/) `GFG` `Google` `Flipkart`
- [All O'one Data Structure](https://leetcode.com/problems/all-oone-data-structure/) `leetcode`
- [Design Skiplist](https://leetcode.com/problems/design-skiplist/) `leetcode`
================================================
FILE: assignments/16-stack-queue.md
================================================
# Problems
## Easy
- [Next greater element I](https://leetcode.com/problems/next-greater-element-i/) `leetcode`
- [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/) `leetcode`
- [Min Stack](https://leetcode.com/problems/min-stack/) `leetcode`
- [Remove Outermost Parentheses](https://leetcode.com/problems/remove-outermost-parentheses/) `leetcode`
- [Remove All Adjacent Duplicates In String](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/) `leetcode`
- [Number of Recent Calls](https://leetcode.com/problems/number-of-recent-calls/) `leetcode`
- [Reverse First K elements of Queue](https://practice.geeksforgeeks.org/problems/reverse-first-k-elements-of-queue/1/) `GFG`
- [Delete middle element of a stack](https://practice.geeksforgeeks.org/problems/delete-middle-element-of-a-stack/1/) `GFG`
- [Inorder Traversal (Iterative)](https://practice.geeksforgeeks.org/problems/inorder-traversal-iterative/1/) `GFG`
- [Preorder traversal (Iterative)](https://practice.geeksforgeeks.org/problems/preorder-traversal-iterative/1/) `GFG`
- [Flood fill](https://leetcode.com/problems/flood-fill/) `leetcode`
- [Implement Queue using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/) `leetcode`
## Medium
- [Design a Stack With Increment Operation](https://leetcode.com/problems/design-a-stack-with-increment-operation/) `leetcode`
- [Minimum Add to Make Parentheses Valid](https://leetcode.com/problems/minimum-add-to-make-parentheses-valid/) `leetcode`
- [Decode String](https://leetcode.com/problems/decode-string/) `leetcode`
- [Asteroid Collision](https://leetcode.com/problems/asteroid-collision/) `leetcode`
- [132 Pattern](https://leetcode.com/problems/132-pattern/) `leetcode`
- [Design circular Queue](https://leetcode.com/problems/design-circular-queue/) `leetcode`
- [Find the Most Competitive Subsequence](https://leetcode.com/problems/find-the-most-competitive-subsequence/) `leetcode`
- [Design Front Middle Back Queue](https://leetcode.com/problems/design-front-middle-back-queue/) `leetcode`
- [Circular tour](https://practice.geeksforgeeks.org/problems/circular-tour/1) `GFG` `Amex` `Amazon`
- [Task Scheduler](https://leetcode.com/problems/task-scheduler/) `leetcode`
- [Stock span problem](https://practice.geeksforgeeks.org/problems/stock-span-problem-1587115621/1/) `GFG`
- [Max Rectangle](https://practice.geeksforgeeks.org/problems/max-rectangle/1/) `GFG`
- [The Celebrity Problem](https://practice.geeksforgeeks.org/problems/the-celebrity-problem/1/) `Google` `GFG`
- [Maximum Rectangular Area in a Histogram](https://practice.geeksforgeeks.org/problems/maximum-rectangular-area-in-a-histogram-1587115620/1/) `GFG`
- [Binary Tree Right Side View](https://leetcode.com/problems/binary-tree-right-side-view/) `leetcode`
- [Snake and Ladders](https://leetcode.com/problems/snakes-and-ladders/) `leetcode`
## Hard
- [Longest Valid Parantheses](https://leetcode.com/problems/longest-valid-parentheses/) `leetcode`
- [Sliding window maximum](https://leetcode.com/problems/sliding-window-maximum/) `leetcode`
- [Brace Expansion II](https://leetcode.com/problems/brace-expansion-ii/) `leetcode`
- [Card Rotation](https://practice.geeksforgeeks.org/problems/card-rotation5834/1/) `GFG`
- [Minimum steps to reach target by a Knight](https://www.geeksforgeeks.org/minimum-steps-reach-target-knight/) `GFG`
- [Count number of islands](https://leetcode.com/problems/number-of-islands/) `leetcode`
================================================
FILE: assignments/17-trees.md
================================================
# Problems
## Easy
- [Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/) `leetcode`
- [Same Tree](https://leetcode.com/problems/same-tree/) `leetcode`
- [Symmetric Tree](https://leetcode.com/problems/symmetric-tree/) `leetcode`
- [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/) `leetcode`
- [Convert Sorted Array to Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/) `leetcode`
- [Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/) `leetcode`
- [Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree/) `leetcode`
- [Path Sum](https://leetcode.com/problems/path-sum/) `leetcode`
- [Binary Tree Preorder Traversal](https://leetcode.com/problems/binary-tree-preorder-traversal/) `leetcode`
- [Binary Tree Postorder Traversal](https://leetcode.com/problems/binary-tree-postorder-traversal/) `leetcode`
- [Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/) `leetcode`
- [Binary Tree Paths](https://leetcode.com/problems/binary-tree-paths/) `leetcode`
- [Sum of Left Leaves](https://leetcode.com/problems/sum-of-left-leaves/) `leetcode`
- [Find Mode in Binary Search Tree](https://leetcode.com/problems/find-mode-in-binary-search-tree/) `leetcode`
- [Minimum Absolute Difference in BST](https://leetcode.com/problems/minimum-absolute-difference-in-bst/) `leetcode`
- [Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/) `leetcode`
## Medium
- [Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/) `leetcode`
- [All Nodes Distance K in Binary Tree](https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/) `leetcode`
- [Validate Binary Tree Nodes](https://leetcode.com/problems/validate-binary-tree-nodes/) `leetcode`
- [Longest Univalue Path](https://leetcode.com/problems/longest-univalue-path/) `leetcode`
- [Closest Nodes Queries in a Binary Search Tree](https://leetcode.com/problems/closest-nodes-queries-in-a-binary-search-tree/) `leetcode`
- [Maximum Width of Binary Tree](https://leetcode.com/problems/maximum-width-of-binary-tree/) `leetcode`
- [Linked List in Binary Tree](https://leetcode.com/problems/linked-list-in-binary-tree/) `leetcode`
- [Operations on Tree](https://leetcode.com/problems/operations-on-tree/) `leetcode`
- [Verify Preorder Serialization of a Binary Tree](https://leetcode.com/problems/verify-preorder-serialization-of-a-binary-tree/) `leetcode`
- [Kth Largest Sum in a Binary Tree](https://leetcode.com/problems/kth-largest-sum-in-a-binary-tree/) `leetcode`
- [Count Nodes With the Highest Score](https://leetcode.com/problems/count-nodes-with-the-highest-score/) `leetcode`
- [Path Sum III](https://leetcode.com/problems/path-sum-iii/) `leetcode`
- [Maximum Product of Splitted Binary Tree](https://leetcode.com/problems/maximum-product-of-splitted-binary-tree/) `leetcode`
- [Most Profitable Path in a Tree](https://leetcode.com/problems/most-profitable-path-in-a-tree/) `leetcode`
- [Step-By-Step Directions From a Binary Tree Node to Another](https://leetcode.com/problems/step-by-step-directions-from-a-binary-tree-node-to-another/) `leetcode`
- [Logical OR of Two Binary Grids Represented as Quad-Trees](https://leetcode.com/problems/logical-or-of-two-binary-grids-represented-as-quad-trees/) `leetcode`
- [Flip Binary Tree To Match Preorder Traversal](https://leetcode.com/problems/flip-binary-tree-to-match-preorder-traversal/) `leetcode`
## Hard
- [Kth Ancestor of a Tree Node](https://leetcode.com/problems/kth-ancestor-of-a-tree-node/) `leetcode`
- [Difference Between Maximum and Minimum Price Sum](https://leetcode.com/problems/difference-between-maximum-and-minimum-price-sum/) `leetcode`
- [Merge BSTs to Create Single BST](https://leetcode.com/problems/merge-bsts-to-create-single-bst/) `leetcode`
- [Frog Position After T Seconds](https://leetcode.com/problems/frog-position-after-t-seconds/) `leetcode`
- [Height of Binary Tree After Subtree Removal Queries](https://leetcode.com/problems/height-of-binary-tree-after-subtree-removal-queries/) `leetcode`
- [Collect Coins in a Tree](https://leetcode.com/problems/collect-coins-in-a-tree/) `leetcode`
- [Binary Tree Maximum Path Sum](https://leetcode.com/problems/binary-tree-maximum-path-sum/) `leetcode`
- [Tree of Coprimes](https://leetcode.com/problems/tree-of-coprimes/) `leetcode`
- [Maximum Sum BST in Binary Tree](https://leetcode.com/problems/maximum-sum-bst-in-binary-tree/) `leetcode`
- [Minimize the Total Price of the Trips](https://leetcode.com/problems/minimize-the-total-price-of-the-trips/) `leetcode`
- [Number Of Ways To Reconstruct A Tree](https://leetcode.com/problems/number-of-ways-to-reconstruct-a-tree/) `leetcode`
- [Smallest Missing Genetic Value in Each Subtree](https://leetcode.com/problems/smallest-missing-genetic-value-in-each-subtree/) `leetcode`
- [Vertical Order Traversal of a Binary Tree](https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree/) `leetcode`
- [Binary Tree Cameras](https://leetcode.com/problems/binary-tree-cameras/) `leetcode`
- [Number of Ways to Reorder Array to Get Same BST](https://leetcode.com/problems/number-of-ways-to-reorder-array-to-get-same-bst/) `leetcode`
- [Count Number of Possible Root Nodes](https://leetcode.com/problems/count-number-of-possible-root-nodes/) `leetcode`
- [Count Ways to Build Rooms in an Ant Colony](https://leetcode.com/problems/count-ways-to-build-rooms-in-an-ant-colony/) `leetcode`
- [Minimum Score After Removals on a Tree](https://leetcode.com/problems/minimum-score-after-removals-on-a-tree/) `leetcode`
- [Create Components With Same Value](https://leetcode.com/problems/create-components-with-same-value/) `leetcode`
- [Serialize and Deserialize Binary Tree](https://leetcode.com/problems/serialize-and-deserialize-binary-tree/) `leetcode`
- [Longest Path With Different Adjacent Characters](https://leetcode.com/problems/longest-path-with-different-adjacent-characters/) `leetcode`
================================================
FILE: assignments/18-heaps.md
================================================
================================================
FILE: lectures/05-first-java-program/first-idea-program/.idea/.gitignore
================================================
# Default ignored files
/shelf/
/workspace.xml
================================================
FILE: lectures/05-first-java-program/first-idea-program/.idea/description.html
================================================
<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>
================================================
FILE: lectures/05-first-java-program/first-idea-program/.idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
================================================
FILE: lectures/05-first-java-program/first-idea-program/.idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectKey">
<option name="state" value="project://e2804f05-5315-4fc6-a121-c522a6c26470" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="openjdk-16" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
================================================
FILE: lectures/05-first-java-program/first-idea-program/.idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/first-idea-program.iml" filepath="$PROJECT_DIR$/first-idea-program.iml" />
</modules>
</component>
</project>
================================================
FILE: lectures/05-first-java-program/first-idea-program/.idea/project-template.xml
================================================
<template>
<input-field default="com.company">IJ_BASE_PACKAGE</input-field>
</template>
================================================
FILE: lectures/05-first-java-program/first-idea-program/.idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>
================================================
FILE: lectures/05-first-java-program/first-idea-program/first-idea-program.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
================================================
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Basics.java
================================================
package com.kunal;
public class Basics {
public static void main(String[] args) {
// int a = 10;
// if (a == 10) {
// System.out.println("Hello World");
// }
// int count = 1;
// while(count != 5) {
// System.out.println(count);
// count++;
// }
// for loop
for(int count = 1; count != 5; count++) {
System.out.println(count);
}
}
}
================================================
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Inputs.java
================================================
package com.kunal;
import java.util.Scanner;
public class Inputs {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
// System.out.print("Please enter some input: ");
// int rollno = input.nextInt();
// System.out.println("Your roll number is " + rollno);
// String name = input.next();
// System.out.println(name);
// float marks = input.nextFloat();
// System.out.println(marks);
}
}
================================================
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Main.java
================================================
package com.kunal;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println(input.nextLine());
}
}
================================================
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Prime.java
================================================
package com.kunal;
import java.util.Scanner;
public class Prime {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("Please enter a number: ");
int n = in.nextInt();
if(n <= 1) {
System.out.println("Neither prime nor composite");
return;
}
int c = 2;
while (c * c <= n) {
if (n % c == 0) {
System.out.println("Not Prime");
return;
}
c = c + 1;
// c++;
}
if (c * c > n) {
System.out.println("Prime");
}
}
}
================================================
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Primitives.java
================================================
package com.kunal;
public class Primitives {
public static void main(String[] args) {
int rollno = 64;
char letter = 'r';
float marks = 98.67f;
double largeDecimalNumbers = 4567654.4567;
long largeInteger = 34567834567876543L;
boolean check = false;
float c = 30.6f;
c++;
// c = (int)(c) + 1;
System.out.println(c);
}
}
================================================
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Sum.java
================================================
package com.kunal;
import java.util.Scanner;
public class Sum {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
float num1 = input.nextFloat();
float num2 = input.nextFloat();
float sum = num1 + num2;
System.out.println("Sum = " + sum);
}
}
================================================
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Temperature.java
================================================
package com.kunal;
import java.util.Scanner;
public class Temperature {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("Please enter temp in C: ");
float tempC = in.nextFloat();
float tempF = (tempC * 9/5) + 32;
System.out.println(tempF);
}
}
================================================
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/TypeCasting.java
================================================
package com.kunal;
import java.util.Scanner;
public class TypeCasting {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
// float num = input.nextFloat();
// int num = input.nextInt();
// System.out.println(num);
// type casting
int num = (int)(67.56f);
// System.out.println(num);
// automatic type promotion in expressions
// int a = 257;
// byte b = (byte)(a); // 257 % 256 = 1
// byte a = 40;
// byte b = 50;
// byte c = 100;
// int d = a * b / c;
//
// System.out.println(d);
// byte b = 50;
// b = b * 2;
// int number = 'A';
// System.out.println("你好");
// System.out.println(3 * 6);
byte b = 42;
char c = 'a';
short s = 1024;
int i = 50000;
float f = 5.67f;
double d = 0.1234;
double result = (f * b) + (i / c) - (d * s);
// float + int - double = double
System.out.println((f * b) + " " + (i / c) + " " + (d * s));
System.out.println(result);
}
}
================================================
FILE: lectures/05-first-java-program/first-tutorial/Demo.java
================================================
public class Demo {
public static void main(String[] args) {
System.out.println(args[1]);
}
}
================================================
FILE: lectures/05-first-java-program/first-tutorial/Main.java
================================================
public class Demo {
public static void main(String[] args) {
System.out.println(args[0]);
}
}
================================================
FILE: lectures/05-first-java-program/notes/literals.txt
================================================
Literals: Java Literals are syntactic representations of boolean, character, numeric, or string data.
Example: 4 is an integer literal.
Identifiers: Identifiers are the names of variables, methods, classes, packages and interfaces
Octal values are denoted in Java by a leading zero. Normal decimal numbers cannot have a leading zero.
Thus, the seemingly valid value 09 will produce an error from the compiler, since 9 is outside of octal’s 0 to 7 range.
You signify a hexadecimal constant with a leading zero-x, (0x or 0X).
The range of a hexadecimal digit is 0 to 15, so A through F (or a through f ) are substituted for 10 through 15.
When a literal value is assigned to a byte or short variable, no error is generated if the literal value is within the
range of the target type. An integer literal can always be assigned to a long variable. However, to specify a long
literal, you will need to explicitly tell the compiler that the literal value is of type long. You do this by appending
an upper- or lowercase L to the literal.
Beginning with JDK 7, you can also specify integer literals using binary. To do so, prefix the value with 0b or 0B.
For example, this specifies the decimal value 10 using a binary literal: int x = 0b1010;
int x = 123_456_789;
the value given to x will be 123,456,789. The underscores will be ignored.
Floating-point literals in Java default to double precision.
To specify a float literal, you must append an F or f to the constant.
Hexadecimal floating-point literals are also supported, but they are rarely used.
They must be in a form similar to scientific notation, but a P or p, rather than an E or e, is used.
For example, 0x12.2P2 is a valid floating-point literal. The value following the P, called the binary exponent,
indicates the power-of-two by which the number is multiplied. Therefore, 0x12.2P2 represents 72.5.
double num = 9_423_497_862.0;
the value given to num will be 9,423,497,862.0
double num = 9_423_497.1_0_9;
In this case, the fractional part is .109
Boolean literals are simple. There are only two logical values that a boolean value can have, true and false.
The values of true and false do not convert into any numerical representation.
The true literal in Java does not equal 1, nor does the false literal equal 0.
As you may know, in some other languages, including C/C++, strings are implemented as arrays of characters.
However, this is not the case in Java. Strings are actually object types.
Because Java implements strings as objects, Java includes extensive string-handling capabilities that are both powerful
and easy to use.
The remainder a % b is defined such that (a / b) * b + a % b is always equal to a :
System.out.println(-15 % 2); // -1
System.out.println(15 % -2); // 1
================================================
FILE: lectures/05-first-java-program/notes/notes.txt
================================================
Terminal: echo $PATH # This is where it looks for the applications that we want to open.
Class name always starts with a capital letter.
To understand code and see control flow, debug the code after putting breakpoint.
We can also change the values in debugger window to see what will happen at a particular value.
Input:
class Scanner to scan something i.e. Input something
command & click on class name to open class file. ex: cmd & click on 'Scanner'
javac -d . cmd.java
The -d switch specifies the destination where to put the generated class file.
OBJECT CLASS :
Object class is present in java.lang package.Every class in Java is directly or indirectly derived from the Object class.
If a Class does not extend any other class then it is direct child class of Object and if extends other class then it is
an indirectly derived. Therefore the Object class methods are available to all Java classes. Hence Object class acts as
a root of inheritance hierarchy in any Java Program.
There are methods in Object class:
toString(), hashCode(), equals(Object obj), getClass(), finalize(), clone(), etc.
NUMBER CLASS :
Most of the time, while working with numbers in java, we use primitive data types. But, Java also provides various
numeric wrapper sub classes under the abstract class Number present in java.lang package.There are mainly six subclasses
under Number class.These sub-classes define some useful methods which are used frequently while dealing with numbers.
Byte, Integer, Double, Short, Float, Long
NOTE : Primitive Wrapper Classes are Immutable in Java.
================================================
FILE: lectures/05-first-java-program/notes/type_conversion&casting.txt
================================================
Type Conversion and Casting:
Java’s Automatic Conversions
When one type of data is assigned to another type of variable, an automatic type conversion will take place if the
following two conditions are met:
• The two types are compatible.
• The destination type is larger than the source type.
Java also performs an automatic type conversion when storing a literal integer constant into variables of type
byte, short, long, or char.
Casting Incompatible Types
Although the automatic type conversions are helpful, they will not fulfill all needs. For example, what if you want to
assign an int value to a byte variable? This conversion will not be performed automatically, because a byte is smaller
than an int. This kind of conversion is sometimes called a narrowing conversion, since you are explicitly making the
value narrower so that it will fit into the target type.
For example, the following fragment casts an int to a byte. If the integer’s value is larger than the range of a byte,
it will be reduced modulo (the remainder of an integer division by the) byte’s range.
int a;
byte b;
b = (byte) a;
A different type of conversion will occur when a floating-point value is assigned to an integer type: truncation.
Automatic Type Promotion in Expressions:
int a = 257;
byte b = (byte)a;
When the value 257 is cast into a byte variable, the result is the remainder of the division of 257 by 256
(the range of a byte), which is 1 in this case.
byte a = 40;
byte b = 50;
byte c = 100;
int d = a * b / c;
The result of the intermediate term a * b easily exceeds the range of either of its byte operands.
To handle this kind of problem, Java automatically promotes each byte, short, or char operand to int when evaluating
an expression. This means that the subexpression a*b is performed using integers—not bytes.
byte b = 50;
b = b * 2; // Error! Cannot assign an int to a byte!
The code is attempting to store 50 * 2, a perfectly valid byte value, back into a byte variable. However, because the
operands were automatically promoted to int when the expression was evaluated, the result has also been promoted to int.
The Type Promotion Rules:
Java defines several type promotion rules that apply to expressions.
They are as follows: First, all byte, short, and char values are promoted to int, as just described.
Then, if one operand is a long, the whole expression is promoted to long. If one operand is a float,
the entire expression is promoted to float. If any of the operands are double, the result is double.
class Promote {
public static void main(String args[]) {
byte b = 42;
char c = 'a';
short s = 1024;
int i = 50000;
float f = 5.67f;
double d = .1234;
double result = (f * b) + (i / c) - (d * s);
System.out.println((f * b) + " + " + (i / c) + " - " + (d * s));
System.out.println("result = " + result);
}
}
Let’s look closely at the type promotions that occur in this line from the program:
double result = (f * b) + (i / c) - (d * s);
In the first subexpression, f * b, b is promoted to a float and the result of the subexpression is float.
Next, in the subexpression i/c, c is promoted to int, and the result is of type int. Then, in d * s, the value of s is
promoted to double, and the type of the subexpression is double. Finally, these three intermediate values, float, int,
and double, are considered. The outcome of float plus an int is a float. Then the resultant float minus the last double
is promoted to double, which is the type for the final result of the expression.
================================================
FILE: lectures/06-conditions-loops/code/.idea/.gitignore
================================================
# Default ignored files
/shelf/
/workspace.xml
================================================
FILE: lectures/06-conditions-loops/code/.idea/description.html
================================================
<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>
================================================
FILE: lectures/06-conditions-loops/code/.idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
================================================
FILE: lectures/06-conditions-loops/code/.idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectKey">
<option name="state" value="project://e2804f05-5315-4fc6-a121-c522a6c26470" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_19" default="true" project-jdk-name="openjdk-16" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
================================================
FILE: lectures/06-conditions-loops/code/.idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/code.iml" filepath="$PROJECT_DIR$/code.iml" />
</modules>
</component>
</project>
================================================
FILE: lectures/06-conditions-loops/code/.idea/project-template.xml
================================================
<template>
<input-field default="com.company">IJ_BASE_PACKAGE</input-field>
</template>
================================================
FILE: lectures/06-conditions-loops/code/.idea/uiDesigner.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
================================================
FILE: lectures/06-conditions-loops/code/.idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>
================================================
FILE: lectures/06-conditions-loops/code/code.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
================================================
FILE: lectures/06-conditions-loops/code/src/com/kunal/Calculator.java
================================================
package com.kunal;
import java.util.Scanner;
public class Calculator {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
// Take input from user till user does not press X or x
int ans = 0;
while (true) {
// take the operator as input
System.out.print("Enter the operator: ");
char op = in.next().trim().charAt(0);
if (op == '+' || op == '-' || op == '*' || op == '/' || op == '%') {
// input two numbers
System.out.print("Enter two numbers: ");
int num1 = in.nextInt();
int num2 = in.nextInt();
if (op == '+') {
ans = num1 + num2;
}
if (op == '-') {
ans = num1 - num2;
}
if (op == '*') {
ans = num1 * num2;
}
if (op == '/') {
if (num2 != 0) {
ans = num1 / num2;
}
}
if (op == '%') {
ans = num1 % num2;
}
} else if (op == 'x' || op == 'X') {
break;
} else {
System.out.println("Invalid operation!!");
}
System.out.println(ans);
}
}
}
================================================
FILE: lectures/06-conditions-loops/code/src/com/kunal/CaseCheck.java
================================================
package com.kunal;
import java.util.Scanner;
public class CaseCheck {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
char ch = in.next().trim().charAt(0);
if (ch >= 'a' && ch <= 'z') {
System.out.println("Lowercase");
} else {
System.out.println("Uppercase");
}
}
}
================================================
FILE: lectures/06-conditions-loops/code/src/com/kunal/Conditionals.java
================================================
package com.kunal;
public class Conditionals {
public static void main(String[] args) {
/*
Syntax of if statements:
if (boolean expression T or F) {
// body
} else {
// do this
}
*/
int salary = 25400;
// if (salary > 10000) {
// salary = salary + 2000;
// } else {
// salary = salary + 1000;
// }
// multiple if-else
// if (salary > 10000) {
// salary += 2000; // salary = salary + 2000
// } else if (salary > 20000) {
// salary += 3000;
// } else {
// salary += 1000;
// }
//
// System.out.println(salary);
int a = 10;
int b = 40;
if (a != 35) {
System.out.println("Hello World");
}
}
}
================================================
FILE: lectures/06-conditions-loops/code/src/com/kunal/CountNums.java
================================================
package com.kunal;
public class CountNums {
public static void main(String[] args) {
int n = 45535;
int count = 0;
while (n > 0) {
int rem = n % 10;
if (rem == 5) {
count++;
}
n = n / 10; // n /= 10
}
System.out.println(count);
}
}
================================================
FILE: lectures/06-conditions-loops/code/src/com/kunal/Fibo.java
================================================
package com.kunal;
import java.util.Scanner;
public class Fibo {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int a = 0;
int b = 1;
int count = 2;
while (count <= n) {
int temp = b;
b = b + a;
a = temp;
count++;
}
System.out.println(b);
}
}
================================================
FILE: lectures/06-conditions-loops/code/src/com/kunal/Largest.java
================================================
package com.kunal;
import java.util.Scanner;
public class Largest {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int b = in.nextInt();
int c = in.nextInt();
// Q: Find the largest of the 3 numbers
// int max = a;
// if (b > max) {
// max = b;
// }
// if (c > max) {
// max = c;
// }
// int max = 0;
// if (a > b) {
// max = a;
// } else {
// max = b;
// }
//
// if (c > max) {
// max = c;
// }
int max = Math.max(c, Math.max(a, b));
System.out.println(max);
}
}
================================================
FILE: lectures/06-conditions-loops/code/src/com/kunal/Loops.java
================================================
package com.kunal;
import java.util.Scanner;
public class Loops {
public static void main(String[] args) {
/*
Syntax of for loops:
for (initialisation; condition; increment/decrement) {
// body
}
*/
// Q: Print numbers from 1 to 5
// for (int num = 1; num <= 5; num += 2) {
// System.out.println(num);
// }
// print numbers from 1 to n
Scanner in = new Scanner(System.in);
// int n = in.nextInt();
// for (int num = 1; num <= n; num++) {
//// System.out.print(num + " ");
// System.out.println("Hello World");
// }
// while loops
/*
Syntax:
while (condition) {
// body
}
*/
// for (int num = 1; num <= 5; num += 2) {
// System.out.println(num);
// }
int num = 1;
while (num <= 5) {
// System.out.println(num);
num += 1;
}
// do while
/*
do {
// body
} while (condition);
*/
int n = 1;
do {
System.out.println("Hello World");
} while (n != 1);
}
}
================================================
FILE: lectures/06-conditions-loops/code/src/com/kunal/Reverse.java
================================================
package com.kunal;
public class Reverse {
public static void main(String[] args) {
int num = 123456;
int ans = 0;
while (num > 0) {
int rem = num % 10;
num /= 10;
ans = ans * 10 + rem;
}
System.out.println(ans);
}
}
================================================
FILE: lectures/06-conditions-loops/switch/.idea/.gitignore
================================================
# Default ignored files
/shelf/
/workspace.xml
================================================
FILE: lectures/06-conditions-loops/switch/.idea/description.html
================================================
<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>
================================================
FILE: lectures/06-conditions-loops/switch/.idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
================================================
FILE: lectures/06-conditions-loops/switch/.idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectKey">
<option name="state" value="project://e2804f05-5315-4fc6-a121-c522a6c26470" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="openjdk-16" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
================================================
FILE: lectures/06-conditions-loops/switch/.idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/switch.iml" filepath="$PROJECT_DIR$/switch.iml" />
</modules>
</component>
</project>
================================================
FILE: lectures/06-conditions-loops/switch/.idea/project-template.xml
================================================
<template>
<input-field default="com.company">IJ_BASE_PACKAGE</input-field>
</template>
================================================
FILE: lectures/06-conditions-loops/switch/.idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>
================================================
FILE: lectures/06-conditions-loops/switch/src/com/kunal/Main.java
================================================
package com.kunal;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
// String fruit = in.next();
//
// switch (fruit) {
// case "Mango" -> System.out.println("King of fruits");
// case "Apple" -> System.out.println("A sweet red fruit");
// case "Orange" -> System.out.println("Round fruit");
// case "Grapes" -> System.out.println("Small fruit");
// default -> System.out.println("please enter a valid fruit");
// }
int day = in.nextInt();
// switch (day) {
// case 1 -> System.out.println("Monday");
// case 2 -> System.out.println("Tuesday");
// case 3 -> System.out.println("Wednesday");
// case 4 -> System.out.println("Thursday");
// case 5 -> System.out.println("Friday");
// case 6 -> System.out.println("Saturday");
// case 7 -> System.out.println("Sunday");
// }
// switch (day) {
// case 1:
// case 2:
// case 3:
// case 4:
// case 5:
// System.out.println("Weekday");
// break;
// case 6:
// case 7:
// System.out.println("Weekend");
// break;
// }
switch (day) {
case 1, 2, 3, 4, 5 -> System.out.println("Weekday");
case 6, 7 -> System.out.println("Weekend");
}
}
}
================================================
FILE: lectures/06-conditions-loops/switch/src/com/kunal/NestedSwitch.java
================================================
package com.kunal;
import java.util.Scanner;
public class NestedSwitch {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int empID = in.nextInt();
String department = in.next();
switch (empID) {
case 1:
System.out.println("Kunal Kushwaha");
break;
case 2:
System.out.println("Rahul Rana");
break;
case 3:
System.out.println("Emp Number 3");
switch (department) {
case "IT":
System.out.println("IT Department");
break;
case "Management":
System.out.println("Management Department");
break;
default:
System.out.println("No department entered");
}
break;
default:
System.out.println("Enter correct EmpID");
}
// better way to write
switch (empID) {
case 1 -> System.out.println("Kunal Kushwaha");
case 2 -> System.out.println("Rahul Rana");
case 3 -> {
System.out.println("Emp Number 3");
switch (department) {
case "IT" -> System.out.println("IT Department");
case "Management" -> System.out.println("Management Department");
default -> System.out.println("No department entered");
}
}
default -> System.out.println("Enter correct EmpID");
}
}
}
================================================
FILE: lectures/06-conditions-loops/switch/switch.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
================================================
FILE: lectures/07-methods/code/.idea/.gitignore
================================================
# Default ignored files
/shelf/
/workspace.xml
================================================
FILE: lectures/07-methods/code/.idea/description.html
================================================
<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>
================================================
FILE: lectures/07-methods/code/.idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
================================================
FILE: lectures/07-methods/code/.idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectKey">
<option name="state" value="project://e2804f05-5315-4fc6-a121-c522a6c26470" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="openjdk-16" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
================================================
FILE: lectures/07-methods/code/.idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/code.iml" filepath="$PROJECT_DIR$/code.iml" />
</modules>
</component>
</project>
================================================
FILE: lectures/07-methods/code/.idea/project-template.xml
================================================
<template>
<input-field default="com.company">IJ_BASE_PACKAGE</input-field>
</template>
================================================
FILE: lectures/07-methods/code/.idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>
================================================
FILE: lectures/07-methods/code/code.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
================================================
FILE: lectures/07-methods/code/src/com/kunal/ChangeValue.java
================================================
package com.kunal;
import java.util.Arrays;
public class ChangeValue{
public static void main(String[] args) {
// create an array
int[] arr = {1, 3, 2, 45, 6};
change(arr);
System.out.println(Arrays.toString(arr));
}
static void change(int[] nums) {
nums[0] = 99; // if you make a change to the object via this ref variable, same object will be changed
}
}
================================================
FILE: lectures/07-methods/code/src/com/kunal/Greeting.java
================================================
package com.kunal;
public class Greeting {
public static void main(String[] args) {
greeting();
}
static void greeting() {
System.out.println("Hello World");
}
}
================================================
FILE: lectures/07-methods/code/src/com/kunal/Main.java
================================================
package com.kunal;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// Q: take input of 2 numbers and print the sum
Scanner in = new Scanner(System.in);
int num1, num2, sum;
System.out.print("Enter number 1: ");
num1 = in.nextInt();
System.out.print("Enter number 2: ");
num2 = in.nextInt();
sum = num1 + num2;
System.out.println("The sum = " + sum);
System.out.print("Enter number 1: ");
num1 = in.nextInt();
System.out.print("Enter number 2: ");
num2 = in.nextInt();
sum = num1 + num2;
System.out.println("The sum = " + sum);
System.out.print("Enter number 1: ");
num1 = in.nextInt();
System.out.print("Enter number 2: ");
num2 = in.nextInt();
sum = num1 + num2;
System.out.println("The sum = " + sum);
System.out.print("Enter number 1: ");
num1 = in.nextInt();
System.out.print("Enter number 2: ");
num2 = in.nextInt();
sum = num1 + num2;
System.out.println("The sum = " + sum);
System.out.print("Enter number 1: ");
num1 = in.nextInt();
System.out.print("Enter number 2: ");
num2 = in.nextInt();
sum = num1 + num2;
System.out.println("The sum = " + sum);
System.out.print("Enter number 1: ");
num1 = in.nextInt();
System.out.print("Enter number 2: ");
num2 = in.nextInt();
sum = num1 + num2;
System.out.println("The sum = " + sum);
System.out.print("Enter number 1: ");
num1 = in.nextInt();
System.out.print("Enter number 2: ");
num2 = in.nextInt();
sum = num1 + num2;
System.out.println("The sum = " + sum);
System.out.print("Enter number 1: ");
num1 = in.nextInt();
System.out.print("Enter number 2: ");
num2 = in.nextInt();
sum = num1 + num2;
System.out.println("The sum = " + sum);
System.out.print("Enter number 1: ");
num1 = in.nextInt();
System.out.print("Enter number 2: ");
num2 = in.nextInt();
sum = num1 + num2;
System.out.println("The sum = " + sum);
System.out.print("Enter number 1: ");
num1 = in.nextInt();
System.out.print("Enter number 2: ");
num2 = in.nextInt();
sum = num1 + num2;
System.out.println("The sum = " + sum);
System.out.print("Enter number 1: ");
num1 = in.nextInt();
System.out.print("Enter number 2: ");
num2 = in.nextInt();
sum = num1 + num2;
System.out.println("The sum = " + sum);
}
}
================================================
FILE: lectures/07-methods/code/src/com/kunal/Overloading.java
================================================
package com.kunal;
public class Overloading {
public static void main(String[] args) {
// fun(67);
// fun("Kunal Kushwaha");
int ans = sum(3, 4, 78);
System.out.println(ans);
}
static int sum(int a, int b) {
return a + b;
}
static int sum(int a, int b, int c) {
return a + b + c;
}
static void fun(int a) {
System.out.println("first one");
System.out.println(a);
}
static void fun(String name) {
System.out.println("Second one");
System.out.println(name);
}
}
================================================
FILE: lectures/07-methods/code/src/com/kunal/PassingExample.java
================================================
package com.kunal;
public class PassingExample {
public static void main(String[] args) {
String chacha = "Iron Man";
greet(chacha);
}
static void greet(String naam) {
System.out.println(naam);
}
}
================================================
FILE: lectures/07-methods/code/src/com/kunal/Questions.java
================================================
package com.kunal;
import java.util.Scanner;
public class Questions {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
// int n = in.nextInt();
// boolean ans = isPrime(n);
// System.out.println(ans);
for (int i = 100; i < 1000; i++) {
if (isArmstrong(i)) {
System.out.print(i + " ");
}
}
}
// print all the 3 digits armstrong numbers
static boolean isArmstrong(int n) {
int original = n;
int sum = 0;
while (n > 0) {
int rem = n % 10;
n = n / 10;
sum = sum + rem*rem*rem;
}
return sum == original;
}
static boolean isPrime(int n) {
if (n <= 1) {
return false;
}
int c = 2;
while (c * c <= n) {
if (n % c == 0) {
return false;
}
c++;
}
return c * c > n;
}
}
================================================
FILE: lectures/07-methods/code/src/com/kunal/Scope.java
================================================
package com.kunal;
public class Scope {
public static void main(String[] args) {
int a = 10;
int b = 20;
String name = "Kunal";
{
// int a = 78; // already initialised outside the block in the same method, hence you cannot initialise again
a = 100; // reassign the origin ref variable to some other value
System.out.println(a);
int c = 99;
name = "Rahul";
System.out.println(name);
// values initialised in this block, will remain in block
}
int c = 900;
System.out.println(a);
System.out.println(name);
// System.out.println(c); // cannot use outside the block
// scoping in for loops
for (int i = 0; i < 4; i++) {
// System.out.println(i);
int num = 90;
a = 10000;
}
System.out.println();
}
static void random(int marks) {
int num = 67;
System.out.println(num);
System.out.println(marks);
}
}
================================================
FILE: lectures/07-methods/code/src/com/kunal/Shadowing.java
================================================
package com.kunal;
public class Shadowing {
static int x = 90; // this will be shadowed at line 8
public static void main(String[] args) {
System.out.println(x); // 90
int x; // the class variable at line 4 is shadowed by this
// System.out.println(x); // scope will begin when value is initialised
x = 40;
System.out.println(x); // 40
fun();
}
static void fun() {
System.out.println(x);
}
}
================================================
FILE: lectures/07-methods/code/src/com/kunal/StringExample.java
================================================
package com.kunal;
import java.util.Scanner;
public class StringExample {
public static void main(String[] args) {
// String message = greet();
// System.out.println(message);
Scanner in = new Scanner(System.in);
System.out.print("Enter your name: ");
String naam = in.next();
String personalised = myGreet(naam);
System.out.println(personalised);
}
static String myGreet(String name) {
String message = "Hello " + name;
return message;
}
static String greet() {
String greeting = "how are you";
return greeting;
}
}
================================================
FILE: lectures/07-methods/code/src/com/kunal/Sum.java
================================================
package com.kunal;
import java.util.Scanner;
public class Sum {
public static void main(String[] args) {
// int ans = sum2();
// System.out.println(ans);
int ans = sum3(20, 30);
System.out.println(ans);
}
// pass the value of numbers when you are calling the method in main()
static int sum3(int a, int b) {
int sum = a + b;
return sum;
}
// return the value
static int sum2() {
Scanner in = new Scanner(System.in);
System.out.print("Enter number 1: ");
int num1 = in.nextInt();
System.out.print("Enter number 2: ");
int num2 = in.nextInt();
int sum = num1 + num2;
return sum;
// System.out.println("This will never execute");
}
static void sum() {
Scanner in = new Scanner(System.in);
System.out.print("Enter number 1: ");
int num1 = in.nextInt();
System.out.print("Enter number 2: ");
int num2 = in.nextInt();
int sum = num1 + num2;
System.out.println("The sum = " + sum);
}
/*
return_type name (arguments) {
// body
return statement;
}
*/
}
================================================
FILE: lectures/07-methods/code/src/com/kunal/Swap.java
================================================
package com.kunal;
public class Swap {
public static void main(String[] args) {
int a = 10;
int b = 20;
// swap numbers code
// int temp = a;
// a = b;
// b = temp;
swap(a, b);
System.out.println(a + " " + b);
String name = "Kunal Kushwaha";
changeName(name);
System.out.println(name);
}
static void changeName(String naam) {
naam = "Rahul Rana"; // creating a new object
}
static void swap(int num1, int num2) {
int temp = num1;
num1 = num2;
num2 = temp;
// this change will only be valid in this function scope only.
}
}
================================================
FILE: lectures/07-methods/code/src/com/kunal/VarArgs.java
================================================
package com.kunal;
import java.util.Arrays;
public class VarArgs {
public static void main(String[] args) {
// fun();
// multiple(2, 3, "Kunal", "Rahul", "dvytsbhusc");
// demo();
}
static void demo(int ...v) {
System.out.println(Arrays.toString(v));
}
static void demo(String ...v) {
System.out.println(Arrays.toString(v));
}
static void multiple(int a, int b, String ...v) {
}
static void fun(int ...v) {
System.out.println(Arrays.toString(v));
}
}
================================================
FILE: lectures/08-arrays/code/.idea/.gitignore
================================================
# Default ignored files
/shelf/
/workspace.xml
================================================
FILE: lectures/08-arrays/code/.idea/description.html
================================================
<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>
================================================
FILE: lectures/08-arrays/code/.idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
================================================
FILE: lectures/08-arrays/code/.idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectKey">
<option name="state" value="project://e2804f05-5315-4fc6-a121-c522a6c26470" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="openjdk-16" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
================================================
FILE: lectures/08-arrays/code/.idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/code.iml" filepath="$PROJECT_DIR$/code.iml" />
</modules>
</component>
</project>
================================================
FILE: lectures/08-arrays/code/.idea/project-template.xml
================================================
<template>
<input-field default="com.company">IJ_BASE_PACKAGE</input-field>
</template>
================================================
FILE: lectures/08-arrays/code/.idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>
================================================
FILE: lectures/08-arrays/code/code.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
================================================
FILE: lectures/08-arrays/code/src/com/kunal/ArrayListExample.java
================================================
package com.kunal;
import java.util.ArrayList;
import java.util.Scanner;
public class ArrayListExample {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
// Syntax
ArrayList<Integer> list = new ArrayList<>(5);
// list.add(67);
// list.add(234);
// list.add(654);
// list.add(43);
// list.add(654);
// list.add(8765);
// System.out.println(list.contains(765432));
// System.out.println(list);
// list.set(0, 99);
//
// list.remove(2);
//
// System.out.println(list);
// input
for (int i = 0; i < 5; i++) {
list.add(in.nextInt());
}
// get item at any index
for (int i = 0; i < 5; i++) {
System.out.println(list.get(i)); // pass index here, list[index] syntax will not work here
}
System.out.println(list);
}
}
================================================
FILE: lectures/08-arrays/code/src/com/kunal/ColNoFixed.java
================================================
package com.kunal;
public class ColNoFixed {
public static void main(String[] args) {
int[][] arr = {
{1, 2, 3, 4},
{5, 6},
{7, 8, 9}
};
for (int row = 0; row < arr.length; row++) {
for (int col = 0; col < arr[row].length; col++) {
System.out.print(arr[row][col] + " ");
}
System.out.println();
}
}
}
================================================
FILE: lectures/08-arrays/code/src/com/kunal/Input.java
================================================
package com.kunal;
import java.util.Arrays;
import java.util.Scanner;
public class Input {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
// array of primitives
int[] arr = new int[5];
arr[0] = 23;
arr[1] = 45;
arr[2] = 233;
arr[3] = 543;
arr[4] = 3;
// [23, 45, 233, 543, 3]
System.out.println(arr[3]);
// input using for loops
for (int i = 0; i < arr.length; i++) {
arr[i] = in.nextInt();
}
//
// System.out.println(Arrays.toString(arr));
// for (int i = 0; i < arr.length; i++) {
// System.out.print(arr[i] + " ");
// }
// for(int num : arr) { // for every element in array, print the element
// System.out.print(num + " "); // here num represents element of the array
// }
// System.out.println(arr[5]); // index out of bound error
// array of objects
String[] str = new String[4];
for (int i = 0; i < str.length; i++) {
str[i] = in.next();
}
System.out.println(Arrays.toString(str));
// modify
str[1] = "kunal";
System.out.println(Arrays.toString(str));
}
}
================================================
FILE: lectures/08-arrays/code/src/com/kunal/Main.java
================================================
package com.kunal;
public class Main {
public static void main(String[] args) {
// Q: store a roll number
int a = 19;
// Q: store a person's name
String name = "Kunal Kushwaha";
// Q: store 5 roll numbers
int rno1 = 23;
int rno2 = 55;
int rno3 = 18;
// syntax
// datatype[] variable_name = new datatype[size];
// store 5 roll numbers:
// int[] rnos = new int[5];
// // or directly
// int[] rnos2 = {23, 12, 45, 32, 15};
int[] ros; // declaration of array. ros is getting defined in the stack
ros = new int[5]; // initialisation: actually here object is being created in the memory (heap)
// System.out.println(ros[1]);
String[] arr = new String[4];
System.out.println(arr[0]);
// for (String element : arr) {
// System.out.println(element);
// }
}
}
================================================
FILE: lectures/08-arrays/code/src/com/kunal/Max.java
================================================
package com.kunal;
public class Max {
public static void main(String[] args) {
int[] arr = {1, 3, 2, 9, 18};
System.out.println(maxRange(arr, 1, 3));
}
// work on edge cases here, like array being null
static int maxRange(int[] arr, int start, int end) {
if (start > end) {
return -1;
}
if (arr == null) {
return -1;
}
int maxVal = arr[start];
for (int i = start; i <= end; i++) {
if (arr[i] > maxVal) {
maxVal = arr[i];
}
}
return maxVal;
}
static int max(int[] arr) {
if (arr.length == 0) {
return -1;
}
int maxVal = arr[0];
for (int i = 1; i < arr.length; i++) {
if (arr[i] > maxVal) {
maxVal = arr[i];
}
}
return maxVal;
}
}
================================================
FILE: lectures/08-arrays/code/src/com/kunal/MultiAL.java
================================================
package com.kunal;
import java.util.ArrayList;
import java.util.Scanner;
public class MultiAL {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
ArrayList<ArrayList<Integer>> list = new ArrayList<>();
// initialisation
for (int i = 0; i < 3; i++) {
list.add(new ArrayList<>());
}
// add elements
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
list.get(i).add(in.nextInt());
}
}
System.out.println(list);
}
}
================================================
FILE: lectures/08-arrays/code/src/com/kunal/MultiDimension.java
================================================
package com.kunal;
import java.util.Arrays;
import java.util.Scanner;
public class MultiDimension {
public static void main(String[] args) {
/*
1 2 3
4 5 6
7 8 9
*/
Scanner in = new Scanner(System.in);
// int[][] arr = new int[3][];
// int[][] arr = {
// {1, 2, 3}, // 0th index
// {4, 5}, // 1st index
// {6, 7, 8, 9} // 2nd index -> arr[2] = {6, 7, 8, 9}
// };
int[][] arr = new int[3][3];
System.out.println(arr.length); // no of rows
// input
for (int row = 0; row < arr.length; row++) {
// for each col in every row
for (int col = 0; col < arr[row].length; col++) {
arr[row][col] = in.nextInt();
}
}
// output
// for (int row = 0; row < arr.length; row++) {
// // for each col in every row
// for (int col = 0; col < arr[row].length; col++) {
// System.out.print(arr[row][col] + " ");
// }
// System.out.println();
// }
// output
// for (int row = 0; row < arr.length; row++) {
// System.out.println(Arrays.toString(arr[row]));
// }
for(int[] a : arr) {
System.out.println(Arrays.toString(a));
}
}
}
================================================
FILE: lectures/08-arrays/code/src/com/kunal/PassinginFunctions.java
================================================
package com.kunal;
import java.util.Arrays;
public class PassinginFunctions {
public static void main(String[] args) {
int[] nums = {3, 4, 5, 12};
System.out.println(Arrays.toString(nums));
change(nums);
System.out.println(Arrays.toString(nums));
}
static void change(int[] arr) {
arr[0] = 99;
}
}
================================================
FILE: lectures/08-arrays/code/src/com/kunal/Swap.java
================================================
package com.kunal;
import java.util.Arrays;
public class Swap {
public static void main(String[] args) {
int[] arr = {1, 3, 23, 9, 18, 56};
// swap(arr, 0, 4);
reverse(arr);
System.out.println(Arrays.toString(arr));
}
static void reverse(int[] arr) {
int start = 0;
int end = arr.length-1;
while (start < end) {
// swap
swap(arr, start, end);
start++;
end--;
}
}
static void swap(int[] arr, int index1, int index2) {
int temp = arr[index1];
arr[index1] = arr[index2];
arr[index2] = temp;
}
}
================================================
FILE: lectures/09-linear search/code/.idea/.gitignore
================================================
# Default ignored files
/shelf/
/workspace.xml
================================================
FILE: lectures/09-linear search/code/.idea/description.html
================================================
<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>
================================================
FILE: lectures/09-linear search/code/.idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
================================================
FILE: lectures/09-linear search/code/.idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectKey">
<option name="state" value="project://e2804f05-5315-4fc6-a121-c522a6c26470" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="openjdk-16" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
================================================
FILE: lectures/09-linear search/code/.idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/code.iml" filepath="$PROJECT_DIR$/code.iml" />
</modules>
</component>
</project>
================================================
FILE: lectures/09-linear search/code/.idea/project-template.xml
================================================
<template>
<input-field default="com.company">IJ_BASE_PACKAGE</input-field>
</template>
================================================
FILE: lectures/09-linear search/code/.idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>
================================================
FILE: lectures/09-linear search/code/code.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
================================================
FILE: lectures/09-linear search/code/src/com/kunal/EvenDigits.java
================================================
package com.kunal;
// https://leetcode.com/problems/find-numbers-with-even-number-of-digits/
public class EvenDigits {
public static void main(String[] args) {
int[] nums = {12,345,2,6,7896};
// System.out.println(findNumbers(nums));
System.out.println(digits2(-345678));
}
static int findNumbers(int[] nums) {
int count = 0;
for(int num : nums) {
if (even(num)) {
count++;
}
}
return count;
}
// function to check whether a number contains even digits or not
static boolean even(int num) {
int numberOfDigits = digits(num);
/*
if (numberOfDigits % 2 == 0) {
return true;
}
return false;
*/
return numberOfDigits % 2 == 0;
}
static int digits2(int num) {
if (num < 0) {
num = num * -1;
}
return (int)(Math.log10(num)) + 1;
}
// count number of digits in a number
static int digits(int num) {
if (num < 0) {
num = num * -1;
}
if (num == 0) {
return 1;
}
int count = 0;
while (num > 0) {
count++;
num = num / 10; // num /= 10
}
return count;
}
}
================================================
FILE: lectures/09-linear search/code/src/com/kunal/FindMin.java
================================================
package com.kunal;
public class FindMin {
public static void main(String[] args) {
int[] arr = {18, 12, 7, 3, 14, 28};
System.out.println(min(arr));
}
// assume arr.length != 0
// return the minimum value in the array
static int min(int[] arr) {
int ans = arr[0];
for (int i = 1; i < arr.length; i++) {
if (arr[i] < ans) {
ans = arr[i];
}
}
return ans;
}
}
================================================
FILE: lectures/09-linear search/code/src/com/kunal/Main.java
================================================
package com.kunal;
public class Main {
public static void main(String[] args) {
int[] nums = {23, 45, 1, 2, 8, 19, -3, 16, -11, 28};
int target = 19;
boolean ans = linearSearch3(nums, target);
System.out.println(ans);
}
// search the target and return true or false
static boolean linearSearch3(int[] arr, int target) {
if (arr.length == 0) {
return false;
}
// run a for loop
for (int element : arr) {
if (element == target) {
return true;
}
}
// this line will execute if none of the return statements above have executed
// hence the target not found
return false;
}
// search the target and return the element
static int linearSearch2(int[] arr, int target) {
if (arr.length == 0) {
return -1;
}
// run a for loop
for (int element : arr) {
if (element == target) {
return element;
}
}
// this line will execute if none of the return statements above have executed
// hence the target not found
return Integer.MAX_VALUE;
}
// search in the array: return the index if item found
// otherwise if item not found return -1
static int linearSearch(int[] arr, int target) {
if (arr.length == 0) {
return -1;
}
// run a for loop
for (int index = 0; index < arr.length; index++) {
// check for element at every index if it is = target
int element = arr[index];
if (element == target) {
return index;
}
}
// this line will execute if none of the return statements above have executed
// hence the target not found
return -1;
}
}
================================================
FILE: lectures/09-linear search/code/src/com/kunal/MaxWealth.java
================================================
package com.kunal;
// https://leetcode.com/problems/richest-customer-wealth/
public class MaxWealth {
public static void main(String[] args) {
}
public int maximumWealth(int[][] accounts) {
// person = rol
// account = col
int ans = Integer.MIN_VALUE;
for (int[] ints : accounts) {
// when you start a new row, take a new sum for that row
int sum = 0;
for (int anInt : ints) {
sum += anInt;
}
// now we have sum of accounts of person
// check with overall ans
if (sum > ans) {
ans = sum;
}
}
return ans;
}
}
================================================
FILE: lectures/09-linear search/code/src/com/kunal/SearchIn2DArray.java
================================================
package com.kunal;
import java.util.Arrays;
public class SearchIn2DArray {
public static void main(String[] args) {
int[][] arr = {
{23, 4, 1},
{18, 12, 3, 9},
{78, 99, 34, 56},
{18, 12}
};
int target = 56;
int[] ans = search(arr,target); // format of return value {row, col}
System.out.println(Arrays.toString(ans));
System.out.println(max(arr));
System.out.println(Integer.MIN_VALUE);
}
static int[] search(int[][] arr, int target) {
for (int row = 0; row < arr.length; row++) {
for (int col = 0; col < arr[row].length; col++) {
if (arr[row][col] == target) {
return new int[]{row, col};
}
}
}
return new int[]{-1, -1};
}
static int max(int[][] arr) {
int max = Integer.MIN_VALUE;
for (int[] ints : arr) {
for (int element : ints) {
if (element > max) {
max = element;
}
}
}
return max;
}
}
================================================
FILE: lectures/09-linear search/code/src/com/kunal/SearchInRange.java
================================================
package com.kunal;
public class SearchInRange {
public static void main(String[] args) {
int[] arr = {18, 12, -7, 3, 14, 28};
int target = 3456;
System.out.println(linearSearch(arr, target, 1, 4));
}
static int linearSearch(int[] arr, int target, int start, int end) {
if (arr.length == 0) {
return -1;
}
// run a for loop
for (int index = start; index <= end; index++) {
// check for element at every index if it is = target
int element = arr[index];
if (element == target) {
return index;
}
}
// this line will execute if none of the return statements above have executed
// hence the target not found
return -1;
}
}
================================================
FILE: lectures/09-linear search/code/src/com/kunal/SearchInStrings.java
================================================
package com.kunal;
import java.util.Arrays;
public class SearchInStrings {
public static void main(String[] args) {
String name = "Kunal";
char target = 'u';
// System.out.println(search(name, target));
System.out.println(Arrays.toString(name.toCharArray()));
}
static boolean search2(String str, char target) {
if (str.length() == 0) {
return false;
}
for(char ch : str.toCharArray()) {
if (ch == target) {
return true;
}
}
return false;
}
static boolean search(String str, char target) {
if (str.length() == 0) {
return false;
}
for (int i = 0; i < str.length(); i++) {
if (target == str.charAt(i)) {
return true;
}
}
return false;
}
}
================================================
FILE: lectures/10-binary search/code/.idea/.gitignore
================================================
# Default ignored files
/shelf/
/workspace.xml
================================================
FILE: lectures/10-binary search/code/.idea/description.html
================================================
<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>
================================================
FILE: lectures/10-binary search/code/.idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
================================================
FILE: lectures/10-binary search/code/.idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectKey">
<option name="state" value="project://e2804f05-5315-4fc6-a121-c522a6c26470" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="openjdk-16" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
================================================
FILE: lectures/10-binary search/code/.idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/code.iml" filepath="$PROJECT_DIR$/code.iml" />
</modules>
</component>
</project>
================================================
FILE: lectures/10-binary search/code/.idea/project-template.xml
================================================
<template>
<input-field default="com.company">IJ_BASE_PACKAGE</input-field>
</template>
================================================
FILE: lectures/10-binary search/code/.idea/uiDesigner.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
================================================
FILE: lectures/10-binary search/code/.idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>
================================================
FILE: lectures/10-binary search/code/code.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
================================================
FILE: lectures/10-binary search/code/src/com/kunal/BinarySearch.java
================================================
package com.kunal;
public class BinarySearch {
public static void main(String[] args) {
int[] arr = {-18, -12, -4, 0, 2, 3, 4, 15, 16, 18, 22, 45, 89};
int target = 22;
int ans = binarySearch(arr, target);
System.out.println(ans);
}
// return the index
// return -1 if it does not exist
static int binarySearch(int[] arr, int target) {
int start = 0;
int end = arr.length - 1;
while(start <= end) {
// find the middle element
// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java
int mid = start + (end - start) / 2;
if (target < arr[mid]) {
end = mid - 1;
} else if (target > arr[mid]) {
start = mid + 1;
} else {
// ans found
return mid;
}
}
return -1;
}
}
================================================
FILE: lectures/10-binary search/code/src/com/kunal/Ceiling.java
================================================
package com.kunal;
public class Ceiling {
public static void main(String[] args) {
int[] arr = {2, 3, 5, 9, 14, 16, 18};
int target = 15;
int ans = ceiling(arr, target);
System.out.println(ans);
}
// return the index of smallest no >= target
static int ceiling(int[] arr, int target) {
// but what if the target is greater than the greatest number in the array
if (target > arr[arr.length - 1]) {
return -1;
}
int start = 0;
int end = arr.length - 1;
while(start <= end) {
// find the middle element
// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java
int mid = start + (end - start) / 2;
if (target < arr[mid]) {
end = mid - 1;
} else if (target > arr[mid]) {
start = mid + 1;
} else {
// ans found
return mid;
}
}
return start;
}
}
================================================
FILE: lectures/10-binary search/code/src/com/kunal/FirstAndLastPosition.java
================================================
package com.kunal;
public class FirstAndLastPosition {
public static void main(String[] args) {
}
public int[] searchRange(int[] nums, int target) {
int[] ans = {-1, -1};
// check for first occurrence if target first
ans[0] = search(nums, target, true);
if (ans[0] != -1) {
ans[1] = search(nums, target, false);
}
return ans;
}
// this function just returns the index value of target
int search(int[] nums, int target, boolean findStartIndex) {
int ans = -1;
int start = 0;
int end = nums.length - 1;
while(start <= end) {
// find the middle element
// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java
int mid = start + (end - start) / 2;
if (target < nums[mid]) {
end = mid - 1;
} else if (target > nums[mid]) {
start = mid + 1;
} else {
// potential ans found
ans = mid;
if (findStartIndex) {
end = mid - 1;
} else {
start = mid + 1;
}
}
}
return ans;
}
}
================================================
FILE: lectures/10-binary search/code/src/com/kunal/Floor.java
================================================
package com.kunal;
public class Floor {
public static void main(String[] args) {
int[] arr = {2, 3, 5, 9, 14, 16, 18};
int target = 1;
int ans = floor(arr, target);
System.out.println(ans);
}
// return the index: greatest number <= target
static int floor(int[] arr, int target) {
int start = 0;
int end = arr.length - 1;
while(start <= end) {
// find the middle element
// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java
int mid = start + (end - start) / 2;
if (target < arr[mid]) {
end = mid - 1;
} else if (target > arr[mid]) {
start = mid + 1;
} else {
// ans found
return mid;
}
}
return end;
}
}
================================================
FILE: lectures/10-binary search/code/src/com/kunal/InfiniteArray.java
================================================
package com.kunal;
// https://www.geeksforgeeks.org/find-position-element-sorted-array-infinite-numbers/
public class InfiniteArray {
public static void main(String[] args) {
int[] arr = {3, 5, 7, 9, 10, 90,
100, 130, 140, 160, 170};
int target = 10;
System.out.println(ans(arr, target));
}
static int ans(int[] arr, int target) {
// first find the range
// first start with a box of size 2
int start = 0;
int end = 1;
// condition for the target to lie in the range
while (target > arr[end]) {
int temp = end + 1; // this is my new start
// double the box value
// end = previous end + sizeofbox*2
end = end + (end - start + 1) * 2;
start = temp;
}
return binarySearch(arr, target, start, end);
}
static int binarySearch(int[] arr, int target, int start, int end) {
while(start <= end) {
// find the middle element
// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java
int mid = start + (end - start) / 2;
if (target < arr[mid]) {
end = mid - 1;
} else if (target > arr[mid]) {
start = mid + 1;
} else {
// ans found
return mid;
}
}
return -1;
}
}
================================================
FILE: lectures/10-binary search/code/src/com/kunal/Mountain.java
================================================
package com.kunal;
public class Mountain {
public static void main(String[] args) {
}
// https://leetcode.com/problems/peak-index-in-a-mountain-array/
// https://leetcode.com/problems/find-peak-element/
public int peakIndexInMountainArray(int[] arr) {
int start = 0;
int end = arr.length - 1;
while (start < end) {
int mid = start + (end - start) / 2;
if (arr[mid] > arr[mid+1]) {
// you are in dec part of array
// this may be the ans, but look at left
// this is why end != mid - 1
end = mid;
} else {
// you are in asc part of array
start = mid + 1; // because we know that mid+1 element > mid element
}
}
// in the end, start == end and pointing to the largest number because of the 2 checks above
// start and end are always trying to find max element in the above 2 checks
// hence, when they are pointing to just one element, that is the max one because that is what the checks say
// more elaboration: at every point of time for start and end, they have the best possible answer till that time
// and if we are saying that only one item is remaining, hence cuz of above line that is the best possible ans
return start; // or return end as both are =
}
}
================================================
FILE: lectures/10-binary search/code/src/com/kunal/OrderAgnosticBS.java
================================================
package com.kunal;
public class OrderAgnosticBS {
public static void main(String[] args) {
// int[] arr = {-18, -12, -4, 0, 2, 3, 4, 15, 16, 18, 22, 45, 89};
int[] arr = {99, 80, 75, 22, 11, 10, 5, 2, -3};
int target = 22;
int ans = orderAgnosticBS(arr, target);
System.out.println(ans);
}
static int orderAgnosticBS(int[] arr, int target) {
int start = 0;
int end = arr.length - 1;
// find whether the array is sorted in ascending or descending
boolean isAsc = arr[start] < arr[end];
while(start <= end) {
// find the middle element
// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java
int mid = start + (end - start) / 2;
if (arr[mid] == target) {
return mid;
}
if (isAsc) {
if (target < arr[mid]) {
end = mid - 1;
} else {
start = mid + 1;
}
} else {
if (target > arr[mid]) {
end = mid - 1;
} else {
start = mid + 1;
}
}
}
return -1;
}
}
================================================
FILE: lectures/10-binary search/code/src/com/kunal/RBS.java
================================================
package com.kunal;
// https://leetcode.com/problems/search-in-rotated-sorted-array/submissions/
public class RBS {
public static void main(String[] args) {
int[] arr = {1,2,3,4,5,5,6};
System.out.println(findPivotWithDuplicates(arr));
}
static int search(int[] nums, int target) {
int pivot = findPivot(nums);
// if you did not find a pivot, it means the array is not rotated
if (pivot == -1) {
// just do normal binary search
return binarySearch(nums, target, 0 , nums.length - 1);
}
// if pivot is found, you have found 2 asc sorted arrays
if (nums[pivot] == target) {
return pivot;
}
if (target >= nums[0]) {
return binarySearch(nums, target, 0, pivot - 1);
}
return binarySearch(nums, target, pivot + 1, nums.length - 1);
}
static int binarySearch(int[] arr, int target, int start, int end) {
while(start <= end) {
// find the middle element
// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java
int mid = start + (end - start) / 2;
if (target < arr[mid]) {
end = mid - 1;
} else if (target > arr[mid]) {
start = mid + 1;
} else {
// ans found
return mid;
}
}
return -1;
}
// this will not work in duplicate values
static int findPivot(int[] arr) {
int start = 0;
int end = arr.length - 1;
while (start <= end) {
int mid = start + (end - start) / 2;
// 4 cases over here
if (mid < end && arr[mid] > arr[mid + 1]) {
return mid;
}
if (mid > start && arr[mid] < arr[mid - 1]) {
return mid-1;
}
if (arr[mid] <= arr[start]) {
end = mid - 1;
} else {
start = mid + 1;
}
}
return -1;
}
static int findPivotWithDuplicates(int[] arr) {
int start = 0;
int end = arr.length - 1;
while (start <= end) {
int mid = start + (end - start) / 2;
// 4 cases over here
if (mid < end && arr[mid] > arr[mid + 1]) {
return mid;
}
if (mid > start && arr[mid] < arr[mid - 1]) {
return mid-1;
}
// if elements at middle, start, end are equal then just skip the duplicates
if (arr[mid] == arr[start] && arr[mid] == arr[end]) {
// skip the duplicates
// NOTE: what if these elements at start and end were the pivot??
// check if start is pivot
if (start < end && arr[start] > arr[start + 1]) {
return start;
}
start++;
// check whether end is pivot
if (end > start && arr[end] < arr[end - 1]) {
return end - 1;
}
end--;
}
// left side is sorted, so pivot should be in right
else if(arr[start] < arr[mid] || (arr[start] == arr[mid] && arr[mid] > arr[end])) {
start = mid + 1;
} else {
end = mid - 1;
}
}
return -1;
}
}
================================================
FILE: lectures/10-binary search/code/src/com/kunal/RotationCount.java
================================================
package com.kunal;
public class RotationCount {
public static void main(String[] args) {
int[] arr = {4,5,6,7,0,1,2};
System.out.println(countRotations(arr));
}
private static int countRotations(int[] arr) {
int pivot = findPivot(arr);
return pivot + 1;
}
// use this for non duplicates
static int findPivot(int[] arr) {
int start = 0;
int end = arr.length - 1;
while (start <= end) {
int mid = start + (end - start) / 2;
// 4 cases over here
if (mid < end && arr[mid] > arr[mid + 1]) {
return mid;
}
if (mid > start && arr[mid] < arr[mid - 1]) {
return mid-1;
}
if (arr[mid] <= arr[start]) {
end = mid - 1;
} else {
start = mid + 1;
}
}
return -1;
}
// use this when arr contains duplicates
static int findPivotWithDuplicates(int[] arr) {
int start = 0;
int end = arr.length - 1;
while (start <= end) {
int mid = start + (end - start) / 2;
// 4 cases over here
if (mid < end && arr[mid] > arr[mid + 1]) {
return mid;
}
if (mid > start && arr[mid] < arr[mid - 1]) {
return mid-1;
}
// if elements at middle, start, end are equal then just skip the duplicates
if (arr[mid] == arr[start] && arr[mid] == arr[end]) {
// skip the duplicates
// NOTE: what if these elements at start and end were the pivot??
// check if start is pivot
if (arr[start] > arr[start + 1]) {
return start;
}
start++;
// check whether end is pivot
if (arr[end] < arr[end - 1]) {
return end - 1;
}
end--;
}
// left side is sorted, so pivot should be in right
else if(arr[start] < arr[mid] || (arr[start] == arr[mid] && arr[mid] > arr[end])) {
start = mid + 1;
} else {
end = mid - 1;
}
}
return -1;
}
}
================================================
FILE: lectures/10-binary search/code/src/com/kunal/RowColMatrix.java
================================================
package com.kunal;
import java.util.Arrays;
public class RowColMatrix {
public static void main(String[] args) {
int[][] arr = {
{10, 20, 30, 40},
{15, 25, 35, 45},
{28, 29, 37, 49},
{33, 34, 38, 50}
};
System.out.println(Arrays.toString(search(arr, 49)));
}
static int[] search(int[][] matrix, int target) {
int r = 0;
int c = matrix[0].length - 1;
while (r < matrix.length && c >= 0) {
if (matrix[r][c] == target) {
return new int[]{r, c};
}
if (matrix[r][c] < target) {
r++;
} else {
c--;
}
}
return new int[]{-1, -1};
}
}
================================================
FILE: lectures/10-binary search/code/src/com/kunal/SearchInMountain.java
================================================
package com.kunal;
public class SearchInMountain {
public static void main(String[] args) {
}
// https://leetcode.com/problems/find-in-mountain-array/
int search(int[] arr, int target) {
int peak = peakIndexInMountainArray(arr);
int firstTry = orderAgnosticBS(arr, target, 0, peak);
if (firstTry != -1) {
return firstTry;
}
// try to search in second half
return orderAgnosticBS(arr, target, peak+1, arr.length - 1);
}
public int peakIndexInMountainArray(int[] arr) {
int start = 0;
int end = arr.length - 1;
while (start < end) {
int mid = start + (end - start) / 2;
if (arr[mid] > arr[mid+1]) {
// you are in dec part of array
// this may be the ans, but look at left
// this is why end != mid - 1
end = mid;
} else {
// you are in asc part of array
start = mid + 1; // because we know that mid+1 element > mid element
}
}
// in the end, start == end and pointing to the largest number because of the 2 checks above
// start and end are always trying to find max element in the above 2 checks
// hence, when they are pointing to just one element, that is the max one because that is what the checks say
// more elaboration: at every point of time for start and end, they have the best possible answer till that time
// and if we are saying that only one item is remaining, hence cuz of above line that is the best possible ans
return start; // or return end as both are =
}
static int orderAgnosticBS(int[] arr, int target, int start, int end) {
// find whether the array is sorted in ascending or descending
boolean isAsc = arr[start] < arr[end];
while(start <= end) {
// find the middle element
// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java
int mid = start + (end - start) / 2;
if (arr[mid] == target) {
return mid;
}
if (isAsc) {
if (target < arr[mid]) {
end = mid - 1;
} else {
start = mid + 1;
}
} else {
if (target > arr[mid]) {
end = mid - 1;
} else {
start = mid + 1;
}
}
}
return -1;
}
}
================================================
FILE: lectures/10-binary search/code/src/com/kunal/SmallestLetter.java
================================================
package com.kunal;
// https://leetcode.com/problems/find-smallest-letter-greater-than-target/
public class SmallestLetter {
public static void main(String[] args) {
}
public char nextGreatestLetter(char[] letters, char target) {
int start = 0;
int end = letters.length - 1;
while(start <= end) {
// find the middle element
// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java
int mid = start + (end - start) / 2;
if (target < letters[mid]) {
end = mid - 1;
} else {
start = mid + 1;
}
}
return letters[start % letters.length];
}
}
================================================
FILE: lectures/10-binary search/code/src/com/kunal/SortedMatrix.java
================================================
package com.kunal;
import java.util.Arrays;
public class SortedMatrix {
public static void main(String[] args) {
int[][] arr = {
{1, 2, 3},
{4, 5, 6},
{7, 8, 9}
};
System.out.println(Arrays.toString(search(arr, 9)));
}
// search in the row provided between the cols provided
static int[] binarySearch(int[][] matrix, int row, int cStart, int cEnd, int target) {
while (cStart <= cEnd) {
int mid = cStart + (cEnd - cStart) / 2;
if (matrix[row][mid] == target) {
return new int[]{row, mid};
}
if (matrix[row][mid] < target) {
cStart = mid + 1;
} else {
cEnd = mid - 1;
}
}
return new int[]{-1, -1};
}
static int[] search(int[][] matrix, int target) {
int rows = matrix.length;
int cols = matrix[0].length; // be cautious, matrix may be empty
if (cols == 0){
return new int[] {-1,-1};
}
if (rows == 1) {
return binarySearch(matrix,0, 0, cols-1, target);
}
int rStart = 0;
int rEnd = rows - 1;
int cMid = cols / 2;
// run the loop till 2 rows are remaining
while (rStart < (rEnd - 1)) { // while this is true it will have more than 2 rows
int mid = rStart + (rEnd - rStart) / 2;
if (matrix[mid][cMid] == target) {
return new int[]{mid, cMid};
}
if (matrix[mid][cMid] < target) {
rStart = mid;
} else {
rEnd = mid;
}
}
// now we have two rows
// check whether the target is in the col of 2 rows
if (matrix[rStart][cMid] == target) {
return new int[]{rStart, cMid};
}
if (matrix[rStart + 1][cMid] == target) {
return new int[]{rStart + 1, cMid};
}
// search in 1st half
if (target <= matrix[rStart][cMid - 1]) {
return binarySearch(matrix, rStart, 0, cMid-1, target);
}
// search in 2nd half
if (target >= matrix[rStart][cMid + 1] && target <= matrix[rStart][cols - 1]) {
return binarySearch(matrix, rStart, cMid + 1, cols - 1, target);
}
// search in 3rd half
if (target <= matrix[rStart + 1][cMid - 1]) {
return binarySearch(matrix, rStart + 1, 0, cMid-1, target);
} else {
return binarySearch(matrix, rStart + 1, cMid + 1, cols - 1, target);
}
}
}
================================================
FILE: lectures/10-binary search/code/src/com/kunal/SplitArray.java
================================================
package com.kunal;
// https://leetcode.com/problems/split-array-largest-sum/
public class SplitArray {
public static void main(String[] args) {
}
public int splitArray(int[] nums, int m) {
int start = 0;
int end = 0;
for (int i = 0; i < nums.length; i++) {
start = Math.max(start, nums[i]); // in the end of the loop this will contain the max item of the array
end += nums[i];
}
// binary search
while (start < end) {
// try for the middle as potential ans
int mid = start + (end - start) / 2;
// calculate how many pieces you can divide this in with this max sum
int sum = 0;
int pieces = 1;
for(int num : nums) {
if (sum + num > mid) {
// you cannot add this in this subarray, make new one
// say you add this num in new subarray, then sum = num
sum = num;
pieces++;
} else {
sum += num;
}
}
if (pieces > m) {
start = mid + 1;
} else {
end = mid;
}
}
return end; // here start == end
}
}
================================================
FILE: lectures/11-sorting/code/.idea/.gitignore
================================================
# Default ignored files
/shelf/
/workspace.xml
================================================
FILE: lectures/11-sorting/code/.idea/description.html
================================================
<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>
================================================
FILE: lectures/11-sorting/code/.idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
================================================
FILE: lectures/11-sorting/code/.idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectKey">
<option name="state" value="project://e2804f05-5315-4fc6-a121-c522a6c26470" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="openjdk-16" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
================================================
FILE: lectures/11-sorting/code/.idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/code.iml" filepath="$PROJECT_DIR$/code.iml" />
</modules>
</component>
</project>
================================================
FILE: lectures/11-sorting/code/.idea/project-template.xml
================================================
<template>
<input-field default="com.company">IJ_BASE_PACKAGE</input-field>
</template>
================================================
FILE: lectures/11-sorting/code/.idea/uiDesigner.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.
gitextract_kj9lo73p/
├── .gitignore
├── README.md
├── SYLLABUS.md
├── assignments/
│ ├── 01-flow-of-program.md
│ ├── 02-first-java.md
│ ├── 03-conditionals-loops.md
│ ├── 04-functions.md
│ ├── 05-arrays.md
│ ├── 06-searching.md
│ ├── 07-sorting.md
│ ├── 08-strings.md
│ ├── 09-patterns.md
│ ├── 10-recursion.md
│ ├── 11-bitwise.md
│ ├── 12-math.md
│ ├── 13-complexities.md
│ ├── 14-oop.md
│ ├── 15-linkedlist.md
│ ├── 16-stack-queue.md
│ ├── 17-trees.md
│ └── 18-heaps.md
└── lectures/
├── 05-first-java-program/
│ ├── first-idea-program/
│ │ ├── .idea/
│ │ │ ├── .gitignore
│ │ │ ├── description.html
│ │ │ ├── encodings.xml
│ │ │ ├── misc.xml
│ │ │ ├── modules.xml
│ │ │ ├── project-template.xml
│ │ │ └── vcs.xml
│ │ ├── first-idea-program.iml
│ │ └── src/
│ │ └── com/
│ │ └── kunal/
│ │ ├── Basics.java
│ │ ├── Inputs.java
│ │ ├── Main.java
│ │ ├── Prime.java
│ │ ├── Primitives.java
│ │ ├── Sum.java
│ │ ├── Temperature.java
│ │ └── TypeCasting.java
│ ├── first-tutorial/
│ │ ├── Demo.java
│ │ └── Main.java
│ └── notes/
│ ├── literals.txt
│ ├── notes.txt
│ └── type_conversion&casting.txt
├── 06-conditions-loops/
│ ├── code/
│ │ ├── .idea/
│ │ │ ├── .gitignore
│ │ │ ├── description.html
│ │ │ ├── encodings.xml
│ │ │ ├── misc.xml
│ │ │ ├── modules.xml
│ │ │ ├── project-template.xml
│ │ │ ├── uiDesigner.xml
│ │ │ └── vcs.xml
│ │ ├── code.iml
│ │ └── src/
│ │ └── com/
│ │ └── kunal/
│ │ ├── Calculator.java
│ │ ├── CaseCheck.java
│ │ ├── Conditionals.java
│ │ ├── CountNums.java
│ │ ├── Fibo.java
│ │ ├── Largest.java
│ │ ├── Loops.java
│ │ └── Reverse.java
│ └── switch/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── src/
│ │ └── com/
│ │ └── kunal/
│ │ ├── Main.java
│ │ └── NestedSwitch.java
│ └── switch.iml
├── 07-methods/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── ChangeValue.java
│ ├── Greeting.java
│ ├── Main.java
│ ├── Overloading.java
│ ├── PassingExample.java
│ ├── Questions.java
│ ├── Scope.java
│ ├── Shadowing.java
│ ├── StringExample.java
│ ├── Sum.java
│ ├── Swap.java
│ └── VarArgs.java
├── 08-arrays/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── ArrayListExample.java
│ ├── ColNoFixed.java
│ ├── Input.java
│ ├── Main.java
│ ├── Max.java
│ ├── MultiAL.java
│ ├── MultiDimension.java
│ ├── PassinginFunctions.java
│ └── Swap.java
├── 09-linear search/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── EvenDigits.java
│ ├── FindMin.java
│ ├── Main.java
│ ├── MaxWealth.java
│ ├── SearchIn2DArray.java
│ ├── SearchInRange.java
│ └── SearchInStrings.java
├── 10-binary search/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ ├── uiDesigner.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── BinarySearch.java
│ ├── Ceiling.java
│ ├── FirstAndLastPosition.java
│ ├── Floor.java
│ ├── InfiniteArray.java
│ ├── Mountain.java
│ ├── OrderAgnosticBS.java
│ ├── RBS.java
│ ├── RotationCount.java
│ ├── RowColMatrix.java
│ ├── SearchInMountain.java
│ ├── SmallestLetter.java
│ ├── SortedMatrix.java
│ └── SplitArray.java
├── 11-sorting/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ ├── uiDesigner.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── CyclicSort.java
│ ├── FindAllDuplicates.java
│ ├── FindAllMissing.java
│ ├── FindDuplicate.java
│ ├── Main.java
│ ├── MissingNumber.java
│ ├── MissingPositive.java
│ └── SetMismatch.java
├── 12-strings/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── Comparison.java
│ ├── Main.java
│ ├── Methods.java
│ ├── Operators.java
│ ├── Output.java
│ ├── Palin.java
│ ├── Performance.java
│ ├── PrettyPrinting.java
│ ├── SB.java
│ └── placeholders_list.txt
├── 13-patterns/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ └── Main.java
├── 14-recursion/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ ├── uiDesigner.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── arrays/
│ │ ├── Find.java
│ │ ├── RBS.java
│ │ └── Sorted.java
│ ├── backtracking/
│ │ ├── AllPaths.java
│ │ ├── Maze.java
│ │ ├── NKnights.java
│ │ ├── NQueens.java
│ │ └── SudokuSolver.java
│ ├── easy/
│ │ ├── CountZeros.java
│ │ ├── DigitProduct.java
│ │ ├── DigitSum.java
│ │ ├── Fact.java
│ │ ├── Nto1.java
│ │ ├── Palindrome.java
│ │ ├── Reverse.java
│ │ ├── Steps.java
│ │ └── Sum.java
│ ├── intro/
│ │ ├── BS.java
│ │ ├── Fibo.java
│ │ ├── Message.java
│ │ ├── NumbersExample.java
│ │ └── NumbersExampleRecursion.java
│ ├── patterns/
│ │ └── Triangle.java
│ ├── sorting/
│ │ ├── MergeSort.java
│ │ └── QuickSort.java
│ └── strings/
│ ├── Ascii.java
│ ├── Dice.java
│ ├── Permutations.java
│ ├── PhonePad.java
│ ├── Stream.java
│ ├── SubSeq.java
│ └── SubSet.java
├── 15-complexity/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ └── Fibo.java
├── 16-math/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ ├── uiDesigner.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── bitwise/
│ │ ├── FindUnique.java
│ │ ├── FlipImage.java
│ │ ├── MagicNumber.java
│ │ ├── NoOfDigits.java
│ │ ├── OddEven.java
│ │ ├── PowOfTwo.java
│ │ ├── Power.java
│ │ ├── RangeXOR.java
│ │ └── SetBits.java
│ └── maths/
│ ├── BinarySearchSQRT.java
│ ├── Factors.java
│ ├── GCD_LCM.java
│ ├── NewtonSQRT.java
│ ├── Prime.java
│ └── Seive.java
├── 17-oop/
│ ├── code/
│ │ ├── .idea/
│ │ │ ├── .gitignore
│ │ │ ├── description.html
│ │ │ ├── encodings.xml
│ │ │ ├── misc.xml
│ │ │ ├── modules.xml
│ │ │ ├── project-template.xml
│ │ │ ├── uiDesigner.xml
│ │ │ └── vcs.xml
│ │ ├── code.iml
│ │ └── src/
│ │ └── com/
│ │ └── kunal/
│ │ ├── abstractDemo/
│ │ │ ├── Daughter.java
│ │ │ ├── Main.java
│ │ │ ├── Parent.java
│ │ │ ├── Parent2.java
│ │ │ └── Son.java
│ │ ├── access/
│ │ │ ├── A.java
│ │ │ ├── Main.java
│ │ │ ├── ObjectDemo.java
│ │ │ └── SubClass.java
│ │ ├── cloning/
│ │ │ ├── Human.java
│ │ │ └── Main.java
│ │ ├── collections/
│ │ │ └── Main.java
│ │ ├── enumExamples/
│ │ │ ├── A.java
│ │ │ └── Basic.java
│ │ ├── exceptionHandling/
│ │ │ ├── Demo.java
│ │ │ ├── Main.java
│ │ │ └── MyException.java
│ │ ├── generics/
│ │ │ ├── CustomArrayList.java
│ │ │ ├── CustomGenArrayList.java
│ │ │ ├── GenericInterface.java
│ │ │ ├── LambdaFunctions.java
│ │ │ ├── Main.java
│ │ │ ├── WildcardExample.java
│ │ │ └── comparing/
│ │ │ ├── Main.java
│ │ │ └── Student.java
│ │ ├── interfaces/
│ │ │ ├── Brake.java
│ │ │ ├── CDPlayer.java
│ │ │ ├── Car.java
│ │ │ ├── ElecticEngine.java
│ │ │ ├── Engine.java
│ │ │ ├── Main.java
│ │ │ ├── Media.java
│ │ │ ├── NiceCar.java
│ │ │ ├── PowerEngine.java
│ │ │ ├── extendDemo/
│ │ │ │ ├── A.java
│ │ │ │ ├── B.java
│ │ │ │ └── Main.java
│ │ │ ├── extendDemo2/
│ │ │ │ ├── A.java
│ │ │ │ ├── B.java
│ │ │ │ └── Main.java
│ │ │ └── nested/
│ │ │ ├── A.java
│ │ │ └── Main.java
│ │ ├── introduction/
│ │ │ ├── Main.java
│ │ │ └── WrapperExample.java
│ │ ├── packages/
│ │ │ ├── a/
│ │ │ │ └── Greeting.java
│ │ │ └── b/
│ │ │ ├── Greeting.java
│ │ │ └── Message.java
│ │ ├── properties/
│ │ │ ├── inheritance/
│ │ │ │ ├── Box.java
│ │ │ │ ├── BoxColor.java
│ │ │ │ ├── BoxPrice.java
│ │ │ │ ├── BoxWeight.java
│ │ │ │ └── Main.java
│ │ │ └── polymorphism/
│ │ │ ├── Circle.java
│ │ │ ├── Main.java
│ │ │ ├── Numbers.java
│ │ │ ├── ObjectPrint.java
│ │ │ ├── Shapes.java
│ │ │ ├── Square.java
│ │ │ └── Triangle.java
│ │ ├── singleton/
│ │ │ ├── Main.java
│ │ │ ├── NotSubClass.java
│ │ │ ├── Singleton.java
│ │ │ └── SubClass.java
│ │ └── staticExample/
│ │ ├── Human.java
│ │ ├── InnerClasses.java
│ │ ├── Main.java
│ │ └── StaticBlock.java
│ └── notes/
│ ├── abstract.txt
│ ├── access_control.txt
│ ├── classes.txt
│ ├── constructors_this_finalize.txt
│ ├── inheritance.txt
│ ├── interface.txt
│ ├── notes.txt
│ ├── overloading.txt
│ ├── overriding.txt
│ ├── packages.txt
│ └── static.txt
├── 18-linkedlist/
│ └── code/
│ ├── .idea/
│ │ ├── .gitignore
│ │ ├── description.html
│ │ ├── encodings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ ├── project-template.xml
│ │ ├── uiDesigner.xml
│ │ └── vcs.xml
│ ├── code.iml
│ └── src/
│ └── com/
│ └── kunal/
│ ├── CLL.java
│ ├── DLL.java
│ ├── InterviewQuestions.java
│ ├── LL.java
│ ├── Main.java
│ └── MergeSort.java
├── 19-stacks-n-queues/
│ ├── code/
│ │ ├── .idea/
│ │ │ ├── .gitignore
│ │ │ ├── description.html
│ │ │ ├── encodings.xml
│ │ │ ├── misc.xml
│ │ │ ├── modules.xml
│ │ │ ├── project-template.xml
│ │ │ ├── uiDesigner.xml
│ │ │ └── vcs.xml
│ │ ├── code.iml
│ │ └── src/
│ │ └── com/
│ │ └── kunal/
│ │ ├── CircularQueue.java
│ │ ├── CustomQueue.java
│ │ ├── CustomStack.java
│ │ ├── DynamicQueue.java
│ │ ├── DynamicStack.java
│ │ ├── InBuiltExamples.java
│ │ ├── QueueMain.java
│ │ ├── StackException.java
│ │ └── StackMain.java
│ └── questions/
│ ├── LargestAreaHistogram.java
│ ├── QueueUsingStack.java
│ ├── QueueUsingStackRemove.java
│ ├── TwoStacks.java
│ ├── ValidParenMinAdd.java
│ └── ValidParenthesis.java
├── 20-trees/
│ └── code/
│ ├── AVL/
│ │ ├── .breakpoints
│ │ ├── .cache/
│ │ │ └── replit/
│ │ │ ├── __replit_disk_meta.json
│ │ │ ├── modules.stamp
│ │ │ └── nix/
│ │ │ └── env.json
│ │ ├── .classpath
│ │ ├── .project
│ │ ├── .replit
│ │ ├── .settings/
│ │ │ ├── org.eclipse.jdt.apt.core.prefs
│ │ │ ├── org.eclipse.jdt.core.prefs
│ │ │ └── org.eclipse.m2e.core.prefs
│ │ ├── .upm/
│ │ │ └── store.json
│ │ ├── AVL.java
│ │ └── Main.java
│ ├── Advance questions/
│ │ ├── DoubleLinkedList.java
│ │ ├── KthSmallest.java
│ │ ├── KthSmallest2.java
│ │ ├── Main.java
│ │ ├── PreIn.java
│ │ ├── TwoNodeSwap.java
│ │ ├── TwoSum.java
│ │ ├── VerticalTraversal.java
│ │ └── WordLadder.java
│ ├── Questions/
│ │ ├── .breakpoints
│ │ ├── .cache/
│ │ │ └── replit/
│ │ │ ├── __replit_disk_meta.json
│ │ │ ├── modules.stamp
│ │ │ └── nix/
│ │ │ └── env.json
│ │ ├── .classpath
│ │ ├── .project
│ │ ├── .replit
│ │ ├── .settings/
│ │ │ ├── org.eclipse.jdt.apt.core.prefs
│ │ │ ├── org.eclipse.jdt.core.prefs
│ │ │ └── org.eclipse.m2e.core.prefs
│ │ ├── .upm/
│ │ │ └── store.json
│ │ ├── BFS.java
│ │ ├── DFS.java
│ │ ├── Main.java
│ │ ├── PathSum.java
│ │ └── SD.java
│ ├── Segment trees/
│ │ ├── Main.java
│ │ └── SegmentTree.java
│ └── introduction/
│ ├── BST.java
│ ├── BinaryTree.java
│ └── Main.java
├── 21-StringBuffer/
│ └── code/
│ ├── Main.java
│ └── RandomString.java
├── 22-large numbers/
│ └── code/
│ ├── Factorial.java
│ └── Main.java
├── 23-file handling/
│ ├── code/
│ │ ├── Input.java
│ │ ├── Main.java
│ │ ├── Output.java
│ │ ├── new-file.txt
│ │ └── note.txt
│ └── notes/
│ └── notes.txt
├── 24-heaps/
│ └── code/
│ └── heaps-1/
│ ├── Heap.java
│ └── Main.java
├── 25-hashmaps/
│ └── code/
│ ├── Hashmaps introduction/
│ │ ├── HashMapFinal.java
│ │ └── Main.java
│ └── KarpRabin/
│ ├── KarpRabin.java
│ └── Main.java
├── 26-advance-sorting/
│ ├── CountSort/
│ │ └── Main.java
│ └── RadixSort/
│ └── Main.java
├── 27-huffman-coding/
│ └── code/
│ ├── Heap.java
│ ├── HuffmanCoder.java
│ └── Main.java
└── 28-sqrt-decomposition/
└── code/
└── Main.java
SYMBOL INDEX (1066 symbols across 256 files)
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Basics.java
class Basics (line 3) | public class Basics {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Inputs.java
class Inputs (line 5) | public class Inputs {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Main.java
class Main (line 5) | public class Main {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Prime.java
class Prime (line 5) | public class Prime {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Primitives.java
class Primitives (line 3) | public class Primitives {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Sum.java
class Sum (line 5) | public class Sum {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/Temperature.java
class Temperature (line 5) | public class Temperature {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/05-first-java-program/first-idea-program/src/com/kunal/TypeCasting.java
class TypeCasting (line 5) | public class TypeCasting {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/05-first-java-program/first-tutorial/Demo.java
class Demo (line 1) | public class Demo {
method main (line 2) | public static void main(String[] args) {
FILE: lectures/05-first-java-program/first-tutorial/Main.java
class Demo (line 1) | public class Demo {
method main (line 2) | public static void main(String[] args) {
FILE: lectures/06-conditions-loops/code/src/com/kunal/Calculator.java
class Calculator (line 5) | public class Calculator {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/06-conditions-loops/code/src/com/kunal/CaseCheck.java
class CaseCheck (line 5) | public class CaseCheck {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/06-conditions-loops/code/src/com/kunal/Conditionals.java
class Conditionals (line 3) | public class Conditionals {
method main (line 5) | public static void main(String[] args) {
FILE: lectures/06-conditions-loops/code/src/com/kunal/CountNums.java
class CountNums (line 3) | public class CountNums {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/06-conditions-loops/code/src/com/kunal/Fibo.java
class Fibo (line 5) | public class Fibo {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/06-conditions-loops/code/src/com/kunal/Largest.java
class Largest (line 5) | public class Largest {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/06-conditions-loops/code/src/com/kunal/Loops.java
class Loops (line 5) | public class Loops {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/06-conditions-loops/code/src/com/kunal/Reverse.java
class Reverse (line 3) | public class Reverse {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/06-conditions-loops/switch/src/com/kunal/Main.java
class Main (line 5) | public class Main {
method main (line 7) | public static void main(String[] args) {
FILE: lectures/06-conditions-loops/switch/src/com/kunal/NestedSwitch.java
class NestedSwitch (line 5) | public class NestedSwitch {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/07-methods/code/src/com/kunal/ChangeValue.java
class ChangeValue (line 5) | public class ChangeValue{
method main (line 6) | public static void main(String[] args) {
method change (line 13) | static void change(int[] nums) {
FILE: lectures/07-methods/code/src/com/kunal/Greeting.java
class Greeting (line 3) | public class Greeting {
method main (line 4) | public static void main(String[] args) {
method greeting (line 7) | static void greeting() {
FILE: lectures/07-methods/code/src/com/kunal/Main.java
class Main (line 5) | public class Main {
method main (line 7) | public static void main(String[] args) {
FILE: lectures/07-methods/code/src/com/kunal/Overloading.java
class Overloading (line 3) | public class Overloading {
method main (line 4) | public static void main(String[] args) {
method sum (line 11) | static int sum(int a, int b) {
method sum (line 15) | static int sum(int a, int b, int c) {
method fun (line 19) | static void fun(int a) {
method fun (line 24) | static void fun(String name) {
FILE: lectures/07-methods/code/src/com/kunal/PassingExample.java
class PassingExample (line 3) | public class PassingExample {
method main (line 4) | public static void main(String[] args) {
method greet (line 9) | static void greet(String naam) {
FILE: lectures/07-methods/code/src/com/kunal/Questions.java
class Questions (line 5) | public class Questions {
method main (line 6) | public static void main(String[] args) {
method isArmstrong (line 20) | static boolean isArmstrong(int n) {
method isPrime (line 33) | static boolean isPrime(int n) {
FILE: lectures/07-methods/code/src/com/kunal/Scope.java
class Scope (line 3) | public class Scope {
method main (line 4) | public static void main(String[] args) {
method random (line 31) | static void random(int marks) {
FILE: lectures/07-methods/code/src/com/kunal/Shadowing.java
class Shadowing (line 3) | public class Shadowing {
method main (line 5) | public static void main(String[] args) {
method fun (line 14) | static void fun() {
FILE: lectures/07-methods/code/src/com/kunal/StringExample.java
class StringExample (line 5) | public class StringExample {
method main (line 7) | public static void main(String[] args) {
method myGreet (line 18) | static String myGreet(String name) {
method greet (line 24) | static String greet() {
FILE: lectures/07-methods/code/src/com/kunal/Sum.java
class Sum (line 5) | public class Sum {
method main (line 6) | public static void main(String[] args) {
method sum3 (line 15) | static int sum3(int a, int b) {
method sum2 (line 21) | static int sum2() {
method sum (line 32) | static void sum() {
FILE: lectures/07-methods/code/src/com/kunal/Swap.java
class Swap (line 3) | public class Swap {
method main (line 4) | public static void main(String[] args) {
method changeName (line 22) | static void changeName(String naam) {
method swap (line 26) | static void swap(int num1, int num2) {
FILE: lectures/07-methods/code/src/com/kunal/VarArgs.java
class VarArgs (line 5) | public class VarArgs {
method main (line 6) | public static void main(String[] args) {
method demo (line 12) | static void demo(int ...v) {
method demo (line 16) | static void demo(String ...v) {
method multiple (line 20) | static void multiple(int a, int b, String ...v) {
method fun (line 24) | static void fun(int ...v) {
FILE: lectures/08-arrays/code/src/com/kunal/ArrayListExample.java
class ArrayListExample (line 6) | public class ArrayListExample {
method main (line 7) | public static void main(String[] args) {
FILE: lectures/08-arrays/code/src/com/kunal/ColNoFixed.java
class ColNoFixed (line 3) | public class ColNoFixed {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/08-arrays/code/src/com/kunal/Input.java
class Input (line 6) | public class Input {
method main (line 7) | public static void main(String[] args) {
FILE: lectures/08-arrays/code/src/com/kunal/Main.java
class Main (line 3) | public class Main {
method main (line 5) | public static void main(String[] args) {
FILE: lectures/08-arrays/code/src/com/kunal/Max.java
class Max (line 3) | public class Max {
method main (line 4) | public static void main(String[] args) {
method maxRange (line 10) | static int maxRange(int[] arr, int start, int end) {
method max (line 29) | static int max(int[] arr) {
FILE: lectures/08-arrays/code/src/com/kunal/MultiAL.java
class MultiAL (line 6) | public class MultiAL {
method main (line 7) | public static void main(String[] args) {
FILE: lectures/08-arrays/code/src/com/kunal/MultiDimension.java
class MultiDimension (line 6) | public class MultiDimension {
method main (line 7) | public static void main(String[] args) {
FILE: lectures/08-arrays/code/src/com/kunal/PassinginFunctions.java
class PassinginFunctions (line 5) | public class PassinginFunctions {
method main (line 6) | public static void main(String[] args) {
method change (line 12) | static void change(int[] arr) {
FILE: lectures/08-arrays/code/src/com/kunal/Swap.java
class Swap (line 5) | public class Swap {
method main (line 6) | public static void main(String[] args) {
method reverse (line 13) | static void reverse(int[] arr) {
method swap (line 24) | static void swap(int[] arr, int index1, int index2) {
FILE: lectures/09-linear search/code/src/com/kunal/EvenDigits.java
class EvenDigits (line 3) | public class EvenDigits {
method main (line 4) | public static void main(String[] args) {
method findNumbers (line 10) | static int findNumbers(int[] nums) {
method even (line 21) | static boolean even(int num) {
method digits2 (line 32) | static int digits2(int num) {
method digits (line 40) | static int digits(int num) {
FILE: lectures/09-linear search/code/src/com/kunal/FindMin.java
class FindMin (line 3) | public class FindMin {
method main (line 4) | public static void main(String[] args) {
method min (line 11) | static int min(int[] arr) {
FILE: lectures/09-linear search/code/src/com/kunal/Main.java
class Main (line 3) | public class Main {
method main (line 5) | public static void main(String[] args) {
method linearSearch3 (line 13) | static boolean linearSearch3(int[] arr, int target) {
method linearSearch2 (line 30) | static int linearSearch2(int[] arr, int target) {
method linearSearch (line 48) | static int linearSearch(int[] arr, int target) {
FILE: lectures/09-linear search/code/src/com/kunal/MaxWealth.java
class MaxWealth (line 3) | public class MaxWealth {
method main (line 4) | public static void main(String[] args) {
method maximumWealth (line 7) | public int maximumWealth(int[][] accounts) {
FILE: lectures/09-linear search/code/src/com/kunal/SearchIn2DArray.java
class SearchIn2DArray (line 5) | public class SearchIn2DArray {
method main (line 6) | public static void main(String[] args) {
method search (line 22) | static int[] search(int[][] arr, int target) {
method max (line 33) | static int max(int[][] arr) {
FILE: lectures/09-linear search/code/src/com/kunal/SearchInRange.java
class SearchInRange (line 3) | public class SearchInRange {
method main (line 4) | public static void main(String[] args) {
method linearSearch (line 10) | static int linearSearch(int[] arr, int target, int start, int end) {
FILE: lectures/09-linear search/code/src/com/kunal/SearchInStrings.java
class SearchInStrings (line 5) | public class SearchInStrings {
method main (line 6) | public static void main(String[] args) {
method search2 (line 15) | static boolean search2(String str, char target) {
method search (line 28) | static boolean search(String str, char target) {
FILE: lectures/10-binary search/code/src/com/kunal/BinarySearch.java
class BinarySearch (line 3) | public class BinarySearch {
method main (line 5) | public static void main(String[] args) {
method binarySearch (line 14) | static int binarySearch(int[] arr, int target) {
FILE: lectures/10-binary search/code/src/com/kunal/Ceiling.java
class Ceiling (line 3) | public class Ceiling {
method main (line 5) | public static void main(String[] args) {
method ceiling (line 13) | static int ceiling(int[] arr, int target) {
FILE: lectures/10-binary search/code/src/com/kunal/FirstAndLastPosition.java
class FirstAndLastPosition (line 3) | public class FirstAndLastPosition {
method main (line 4) | public static void main(String[] args) {
method searchRange (line 8) | public int[] searchRange(int[] nums, int target) {
method search (line 20) | int search(int[] nums, int target, boolean findStartIndex) {
FILE: lectures/10-binary search/code/src/com/kunal/Floor.java
class Floor (line 3) | public class Floor {
method main (line 5) | public static void main(String[] args) {
method floor (line 13) | static int floor(int[] arr, int target) {
FILE: lectures/10-binary search/code/src/com/kunal/InfiniteArray.java
class InfiniteArray (line 3) | public class InfiniteArray {
method main (line 4) | public static void main(String[] args) {
method ans (line 10) | static int ans(int[] arr, int target) {
method binarySearch (line 27) | static int binarySearch(int[] arr, int target, int start, int end) {
FILE: lectures/10-binary search/code/src/com/kunal/Mountain.java
class Mountain (line 3) | public class Mountain {
method main (line 4) | public static void main(String[] args) {
method peakIndexInMountainArray (line 9) | public int peakIndexInMountainArray(int[] arr) {
FILE: lectures/10-binary search/code/src/com/kunal/OrderAgnosticBS.java
class OrderAgnosticBS (line 3) | public class OrderAgnosticBS {
method main (line 4) | public static void main(String[] args) {
method orderAgnosticBS (line 12) | static int orderAgnosticBS(int[] arr, int target) {
FILE: lectures/10-binary search/code/src/com/kunal/RBS.java
class RBS (line 3) | public class RBS {
method main (line 4) | public static void main(String[] args) {
method search (line 9) | static int search(int[] nums, int target) {
method binarySearch (line 30) | static int binarySearch(int[] arr, int target, int start, int end) {
method findPivot (line 49) | static int findPivot(int[] arr) {
method findPivotWithDuplicates (line 70) | static int findPivotWithDuplicates(int[] arr) {
FILE: lectures/10-binary search/code/src/com/kunal/RotationCount.java
class RotationCount (line 3) | public class RotationCount {
method main (line 4) | public static void main(String[] args) {
method countRotations (line 9) | private static int countRotations(int[] arr) {
method findPivot (line 15) | static int findPivot(int[] arr) {
method findPivotWithDuplicates (line 37) | static int findPivotWithDuplicates(int[] arr) {
FILE: lectures/10-binary search/code/src/com/kunal/RowColMatrix.java
class RowColMatrix (line 5) | public class RowColMatrix {
method main (line 6) | public static void main(String[] args) {
method search (line 17) | static int[] search(int[][] matrix, int target) {
FILE: lectures/10-binary search/code/src/com/kunal/SearchInMountain.java
class SearchInMountain (line 3) | public class SearchInMountain {
method main (line 4) | public static void main(String[] args) {
method search (line 8) | int search(int[] arr, int target) {
method peakIndexInMountainArray (line 18) | public int peakIndexInMountainArray(int[] arr) {
method orderAgnosticBS (line 42) | static int orderAgnosticBS(int[] arr, int target, int start, int end) {
FILE: lectures/10-binary search/code/src/com/kunal/SmallestLetter.java
class SmallestLetter (line 3) | public class SmallestLetter {
method main (line 5) | public static void main(String[] args) {
method nextGreatestLetter (line 9) | public char nextGreatestLetter(char[] letters, char target) {
FILE: lectures/10-binary search/code/src/com/kunal/SortedMatrix.java
class SortedMatrix (line 5) | public class SortedMatrix {
method main (line 6) | public static void main(String[] args) {
method binarySearch (line 16) | static int[] binarySearch(int[][] matrix, int row, int cStart, int cEn...
method search (line 31) | static int[] search(int[][] matrix, int target) {
FILE: lectures/10-binary search/code/src/com/kunal/SplitArray.java
class SplitArray (line 3) | public class SplitArray {
method main (line 4) | public static void main(String[] args) {
method splitArray (line 8) | public int splitArray(int[] nums, int m) {
FILE: lectures/11-sorting/code/src/com/kunal/CyclicSort.java
class CyclicSort (line 5) | public class CyclicSort {
method main (line 6) | public static void main(String[] args) {
method sort (line 12) | static void sort(int[] arr) {
method swap (line 24) | static void swap(int[] arr, int first, int second) {
FILE: lectures/11-sorting/code/src/com/kunal/FindAllDuplicates.java
class FindAllDuplicates (line 6) | public class FindAllDuplicates {
method findDuplicates (line 7) | public List<Integer> findDuplicates(int[] arr) {
method swap (line 28) | static void swap(int[] arr, int first, int second) {
FILE: lectures/11-sorting/code/src/com/kunal/FindAllMissing.java
class FindAllMissing (line 8) | class FindAllMissing {
method findDisappearedNumbers (line 9) | public List<Integer> findDisappearedNumbers(int[] nums) {
method swap (line 31) | static void swap(int[] arr, int first, int second) {
FILE: lectures/11-sorting/code/src/com/kunal/FindDuplicate.java
class FindDuplicate (line 3) | public class FindDuplicate {
method findDuplicate (line 4) | public int findDuplicate(int[] arr) {
method swap (line 22) | static void swap(int[] arr, int first, int second) {
FILE: lectures/11-sorting/code/src/com/kunal/Main.java
class Main (line 5) | public class Main {
method main (line 7) | public static void main(String[] args) {
method insertion (line 13) | static void insertion(int[] arr) {
method selection (line 25) | static void selection(int[] arr) {
method swap (line 34) | static void swap(int[] arr, int first, int second) {
method getMaxIndex (line 40) | static int getMaxIndex(int[] arr, int start, int end) {
method bubble (line 50) | static void bubble(int[] arr) {
FILE: lectures/11-sorting/code/src/com/kunal/MissingNumber.java
class MissingNumber (line 4) | class MissingNumber {
method main (line 6) | public static void main(String[] args) {
method missingNumber (line 11) | public static int missingNumber(int[] arr) {
method swap (line 33) | static void swap(int[] arr, int first, int second) {
FILE: lectures/11-sorting/code/src/com/kunal/MissingPositive.java
class MissingPositive (line 3) | public class MissingPositive {
method firstMissingPositive (line 5) | public static int firstMissingPositive(int[] arr) {
method swap (line 27) | static void swap(int[] arr, int first, int second) {
FILE: lectures/11-sorting/code/src/com/kunal/SetMismatch.java
class SetMismatch (line 3) | public class SetMismatch {
method findErrorNums (line 4) | public int[] findErrorNums(int[] arr) {
method swap (line 24) | static void swap(int[] arr, int first, int second) {
FILE: lectures/12-strings/code/src/com/kunal/Comparison.java
class Comparison (line 3) | public class Comparison {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/12-strings/code/src/com/kunal/Main.java
class Main (line 3) | public class Main {
method main (line 5) | public static void main(String[] args) {
FILE: lectures/12-strings/code/src/com/kunal/Methods.java
class Methods (line 5) | public class Methods {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/12-strings/code/src/com/kunal/Operators.java
class Operators (line 5) | public class Operators {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/12-strings/code/src/com/kunal/Output.java
class Output (line 5) | public class Output {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/12-strings/code/src/com/kunal/Palin.java
class Palin (line 3) | public class Palin {
method main (line 4) | public static void main(String[] args) {
method isPalindrome (line 9) | static boolean isPalindrome(String str) {
FILE: lectures/12-strings/code/src/com/kunal/Performance.java
class Performance (line 3) | public class Performance {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/12-strings/code/src/com/kunal/PrettyPrinting.java
class PrettyPrinting (line 3) | public class PrettyPrinting {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/12-strings/code/src/com/kunal/SB.java
class SB (line 3) | public class SB {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/13-patterns/code/src/com/kunal/Main.java
class Main (line 3) | public class Main {
method main (line 4) | public static void main(String[] args) {
method pattern31 (line 8) | static void pattern31(int n) {
method pattern30 (line 20) | static void pattern30(int n) {
method pattern17 (line 38) | static void pattern17(int n) {
method pattern28 (line 58) | static void pattern28(int n) {
method pattern5 (line 74) | static void pattern5(int n) {
method pattern4 (line 84) | static void pattern4(int n) {
method pattern3 (line 95) | static void pattern3(int n) {
method pattern1 (line 106) | static void pattern1(int n) {
method pattern2 (line 117) | static void pattern2(int n) {
FILE: lectures/14-recursion/code/src/com/kunal/arrays/Find.java
class Find (line 5) | public class Find {
method main (line 6) | public static void main(String[] args) {
method find (line 24) | static boolean find(int[] arr, int target, int index) {
method findIndex (line 31) | static int findIndex(int[] arr, int target, int index) {
method findIndexLast (line 42) | static int findIndexLast(int[] arr, int target, int index) {
method findAllIndex (line 54) | static void findAllIndex(int[] arr, int target, int index) {
method findAllIndex (line 64) | static ArrayList<Integer> findAllIndex(int[] arr, int target, int inde...
method findAllIndex2 (line 74) | static ArrayList<Integer> findAllIndex2(int[] arr, int target, int ind...
FILE: lectures/14-recursion/code/src/com/kunal/arrays/RBS.java
class RBS (line 3) | public class RBS {
method main (line 4) | public static void main(String[] args) {
method search (line 9) | static int search(int[] arr, int target, int s, int e) {
FILE: lectures/14-recursion/code/src/com/kunal/arrays/Sorted.java
class Sorted (line 3) | public class Sorted {
method main (line 4) | public static void main(String[] args) {
method sorted (line 9) | static boolean sorted(int[] arr, int index) {
FILE: lectures/14-recursion/code/src/com/kunal/backtracking/AllPaths.java
class AllPaths (line 5) | public class AllPaths {
method main (line 6) | public static void main(String[] args) {
method allPath (line 16) | static void allPath(String p, boolean[][] maze, int r, int c) {
method allPathPrint (line 52) | static void allPathPrint(String p, boolean[][] maze, int r, int c, int...
FILE: lectures/14-recursion/code/src/com/kunal/backtracking/Maze.java
class Maze (line 5) | public class Maze {
method main (line 6) | public static void main(String[] args) {
method count (line 22) | static int count(int r, int c) {
method path (line 31) | static void path(String p, int r, int c) {
method pathRet (line 46) | static ArrayList<String> pathRet(String p, int r, int c) {
method pathRetDiagonal (line 66) | static ArrayList<String> pathRetDiagonal(String p, int r, int c) {
method pathRestrictions (line 90) | static void pathRestrictions(String p, boolean[][] maze, int r, int c) {
FILE: lectures/14-recursion/code/src/com/kunal/backtracking/NKnights.java
class NKnights (line 3) | public class NKnights {
method main (line 4) | public static void main(String[] args) {
method knight (line 10) | static void knight(boolean[][] board, int row, int col, int knights) {
method isSafe (line 35) | private static boolean isSafe(boolean[][] board, int row, int col) {
method isValid (line 64) | static boolean isValid(boolean[][] board, int row, int col) {
method display (line 71) | private static void display(boolean[][] board) {
FILE: lectures/14-recursion/code/src/com/kunal/backtracking/NQueens.java
class NQueens (line 3) | public class NQueens {
method main (line 4) | public static void main(String[] args) {
method queens (line 10) | static int queens(boolean[][] board, int row) {
method isSafe (line 32) | private static boolean isSafe(boolean[][] board, int row, int col) {
method display (line 59) | private static void display(boolean[][] board) {
FILE: lectures/14-recursion/code/src/com/kunal/backtracking/SudokuSolver.java
class SudokuSolver (line 3) | public class SudokuSolver {
method main (line 4) | public static void main(String[] args) {
method solve (line 25) | static boolean solve(int[][] board) {
method display (line 69) | private static void display(int[][] board) {
method isSafe (line 79) | static boolean isSafe(int[][] board, int row, int col, int num) {
FILE: lectures/14-recursion/code/src/com/kunal/easy/CountZeros.java
class CountZeros (line 3) | public class CountZeros {
method main (line 4) | public static void main(String[] args) {
method count (line 8) | static int count(int n) {
method helper (line 13) | private static int helper(int n, int c) {
FILE: lectures/14-recursion/code/src/com/kunal/easy/DigitProduct.java
class DigitProduct (line 3) | public class DigitProduct {
method main (line 4) | public static void main(String[] args) {
method prod (line 9) | static int prod(int n) {
FILE: lectures/14-recursion/code/src/com/kunal/easy/DigitSum.java
class DigitSum (line 3) | public class DigitSum {
method main (line 4) | public static void main(String[] args) {
method sum (line 9) | static int sum(int n) {
FILE: lectures/14-recursion/code/src/com/kunal/easy/Fact.java
class Fact (line 3) | public class Fact {
method main (line 4) | public static void main(String[] args) {
method fact (line 9) | static int fact(int n) {
FILE: lectures/14-recursion/code/src/com/kunal/easy/Nto1.java
class Nto1 (line 3) | public class Nto1 {
method main (line 4) | public static void main(String[] args) {
method concept (line 9) | static void concept(int n) {
method fun (line 19) | static void fun(int n) {
method funRev (line 27) | static void funRev(int n) {
method funBoth (line 35) | static void funBoth(int n) {
FILE: lectures/14-recursion/code/src/com/kunal/easy/Palindrome.java
class Palindrome (line 3) | public class Palindrome {
method rev (line 4) | static int rev(int n) {
method helper (line 11) | private static int helper(int n, int digits) {
method palin (line 19) | static boolean palin(int n) {
method main (line 23) | public static void main(String[] args) {
FILE: lectures/14-recursion/code/src/com/kunal/easy/Reverse.java
class Reverse (line 3) | public class Reverse {
method rev1 (line 5) | static void rev1(int n) {
method rev2 (line 14) | static int rev2(int n) {
method helper (line 21) | private static int helper(int n, int digits) {
method main (line 29) | public static void main(String[] args) {
FILE: lectures/14-recursion/code/src/com/kunal/easy/Steps.java
class Steps (line 3) | public class Steps {
method main (line 4) | public static void main(String[] args) {
method numberOfSteps (line 8) | public int numberOfSteps(int num) {
method helper (line 12) | private int helper(int num, int steps) {
FILE: lectures/14-recursion/code/src/com/kunal/easy/Sum.java
class Sum (line 3) | public class Sum {
method main (line 4) | public static void main(String[] args) {
method sum (line 9) | static int sum(int n) {
FILE: lectures/14-recursion/code/src/com/kunal/intro/BS.java
class BS (line 3) | public class BS {
method main (line 4) | public static void main(String[] args) {
method search (line 10) | static int search(int[] arr, int target, int s, int e) {
FILE: lectures/14-recursion/code/src/com/kunal/intro/Fibo.java
class Fibo (line 3) | public class Fibo {
method main (line 4) | public static void main(String[] args) {
method fibo (line 9) | static int fibo(int n) {
FILE: lectures/14-recursion/code/src/com/kunal/intro/Message.java
class Message (line 3) | public class Message {
method main (line 5) | public static void main(String[] args) {
method message (line 10) | static void message() {
method message1 (line 15) | static void message1() {
method message2 (line 20) | static void message2() {
method message3 (line 25) | static void message3() {
method message4 (line 30) | static void message4() {
FILE: lectures/14-recursion/code/src/com/kunal/intro/NumbersExample.java
class NumbersExample (line 3) | public class NumbersExample {
method main (line 4) | public static void main(String[] args) {
method print1 (line 11) | static void print1(int n) {
method print2 (line 16) | static void print2(int n) {
method print3 (line 21) | static void print3(int n) {
method print4 (line 26) | static void print4(int n) {
method print5 (line 32) | static void print5(int n) {
FILE: lectures/14-recursion/code/src/com/kunal/intro/NumbersExampleRecursion.java
class NumbersExampleRecursion (line 3) | public class NumbersExampleRecursion {
method main (line 4) | public static void main(String[] args) {
method print (line 11) | static void print(int n) {
FILE: lectures/14-recursion/code/src/com/kunal/patterns/Triangle.java
class Triangle (line 5) | public class Triangle {
method main (line 6) | public static void main(String[] args) {
method triangle2 (line 13) | static void triangle2(int r, int c) {
method triangle (line 26) | static void triangle(int r, int c) {
method bubble (line 40) | static void bubble(int[] arr, int r, int c) {
method selection (line 59) | static void selection(int[] arr, int r, int c, int max) {
FILE: lectures/14-recursion/code/src/com/kunal/sorting/MergeSort.java
class MergeSort (line 5) | public class MergeSort {
method main (line 6) | public static void main(String[] args) {
method mergeSort (line 12) | static int[] mergeSort(int[] arr) {
method merge (line 25) | private static int[] merge(int[] first, int[] second) {
method mergeSortInPlace (line 62) | static void mergeSortInPlace(int[] arr, int s, int e) {
method mergeInPlace (line 75) | private static void mergeInPlace(int[] arr, int s, int m, int e) {
FILE: lectures/14-recursion/code/src/com/kunal/sorting/QuickSort.java
class QuickSort (line 5) | public class QuickSort {
method main (line 6) | public static void main(String[] args) {
method sort (line 13) | static void sort(int[] nums, int low, int hi) {
FILE: lectures/14-recursion/code/src/com/kunal/strings/Ascii.java
class Ascii (line 3) | public class Ascii {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/14-recursion/code/src/com/kunal/strings/Dice.java
class Dice (line 5) | public class Dice {
method main (line 6) | public static void main(String[] args) {
method dice (line 11) | static void dice(String p, int target) {
method diceRet (line 22) | static ArrayList<String> diceRet(String p, int target) {
method diceFace (line 35) | static void diceFace(String p, int target, int face) {
method diceFaceRet (line 46) | static ArrayList<String> diceFaceRet(String p, int target, int face) {
FILE: lectures/14-recursion/code/src/com/kunal/strings/Permutations.java
class Permutations (line 5) | public class Permutations {
method main (line 6) | public static void main(String[] args) {
method permutations (line 15) | static void permutations(String p, String up) {
method permutationsList (line 28) | static ArrayList<String> permutationsList(String p, String up) {
method permutationsCount (line 47) | static int permutationsCount(String p, String up) {
FILE: lectures/14-recursion/code/src/com/kunal/strings/PhonePad.java
class PhonePad (line 5) | public class PhonePad {
method main (line 6) | public static void main(String[] args) {
method pad (line 11) | static void pad(String p, String up) {
method padRet (line 24) | static ArrayList<String> padRet(String p, String up) {
method padCount (line 41) | static int padCount(String p, String up) {
FILE: lectures/14-recursion/code/src/com/kunal/strings/Stream.java
class Stream (line 3) | public class Stream {
method main (line 4) | public static void main(String[] args) {
method skip (line 8) | static void skip(String p, String up) {
method skip (line 22) | static String skip(String up) {
method skipApple (line 36) | static String skipApple(String up) {
method skipAppNotApple (line 47) | static String skipAppNotApple(String up) {
FILE: lectures/14-recursion/code/src/com/kunal/strings/SubSeq.java
class SubSeq (line 5) | public class SubSeq {
method main (line 6) | public static void main(String[] args) {
method subseq (line 11) | static void subseq(String p, String up) {
method subseqRet (line 21) | static ArrayList<String> subseqRet(String p, String up) {
method subseqAscii (line 35) | static void subseqAscii(String p, String up) {
method subseqAsciiRet (line 46) | static ArrayList<String> subseqAsciiRet(String p, String up) {
FILE: lectures/14-recursion/code/src/com/kunal/strings/SubSet.java
class SubSet (line 7) | public class SubSet {
method main (line 8) | public static void main(String[] args) {
method subset (line 16) | static List<List<Integer>> subset(int[] arr) {
method subsetDuplicate (line 30) | static List<List<Integer>> subsetDuplicate(int[] arr) {
FILE: lectures/15-complexity/code/src/com/kunal/Fibo.java
class Fibo (line 3) | public class Fibo {
method main (line 4) | public static void main(String[] args) {
method fiboFormula (line 12) | static int fiboFormula(int n){
method fibo (line 17) | static int fibo(int n) {
FILE: lectures/16-math/code/src/com/kunal/bitwise/FindUnique.java
class FindUnique (line 3) | public class FindUnique {
method main (line 4) | public static void main(String[] args) {
method ans (line 9) | private static int ans(int[] arr) {
FILE: lectures/16-math/code/src/com/kunal/bitwise/FlipImage.java
class FlipImage (line 3) | class FlipImage {
method flipAndInvertImage (line 4) | public int[][] flipAndInvertImage(int[][] image) {
FILE: lectures/16-math/code/src/com/kunal/bitwise/MagicNumber.java
class MagicNumber (line 3) | public class MagicNumber {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/16-math/code/src/com/kunal/bitwise/NoOfDigits.java
class NoOfDigits (line 3) | public class NoOfDigits {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/16-math/code/src/com/kunal/bitwise/OddEven.java
class OddEven (line 3) | public class OddEven {
method main (line 5) | public static void main(String[] args) {
method isOdd (line 10) | private static boolean isOdd(int n) {
FILE: lectures/16-math/code/src/com/kunal/bitwise/PowOfTwo.java
class PowOfTwo (line 3) | public class PowOfTwo {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/16-math/code/src/com/kunal/bitwise/Power.java
class Power (line 3) | public class Power {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/16-math/code/src/com/kunal/bitwise/RangeXOR.java
class RangeXOR (line 3) | public class RangeXOR {
method main (line 4) | public static void main(String[] args) {
method xor (line 23) | static int xor(int a) {
FILE: lectures/16-math/code/src/com/kunal/bitwise/SetBits.java
class SetBits (line 3) | public class SetBits {
method main (line 4) | public static void main(String[] args) {
method setBits (line 11) | private static int setBits(int n) {
FILE: lectures/16-math/code/src/com/kunal/maths/BinarySearchSQRT.java
class BinarySearchSQRT (line 3) | public class BinarySearchSQRT {
method main (line 4) | public static void main(String[] args) {
method sqrt (line 12) | static double sqrt(int n, int p) {
FILE: lectures/16-math/code/src/com/kunal/maths/Factors.java
class Factors (line 5) | public class Factors {
method main (line 6) | public static void main(String[] args) {
method factors1 (line 11) | static void factors1(int n) {
method factors2 (line 20) | static void factors2(int n) {
method factors3 (line 33) | static void factors3(int n) {
FILE: lectures/16-math/code/src/com/kunal/maths/GCD_LCM.java
class GCD_LCM (line 3) | public class GCD_LCM {
method main (line 4) | public static void main(String[] args) {
method gcd (line 9) | static int gcd(int a, int b) {
method lcm (line 16) | static int lcm(int a, int b) {
FILE: lectures/16-math/code/src/com/kunal/maths/NewtonSQRT.java
class NewtonSQRT (line 3) | public class NewtonSQRT {
method main (line 4) | public static void main(String[] args) {
method sqrt (line 7) | static double sqrt(double n) {
FILE: lectures/16-math/code/src/com/kunal/maths/Prime.java
class Prime (line 3) | public class Prime {
method main (line 4) | public static void main(String[] args) {
method isPrime (line 11) | static boolean isPrime(int n) {
FILE: lectures/16-math/code/src/com/kunal/maths/Seive.java
class Seive (line 3) | public class Seive {
method main (line 4) | public static void main(String[] args) {
method sieve (line 11) | static void sieve(int n, boolean[] primes) {
FILE: lectures/17-oop/code/src/com/kunal/abstractDemo/Daughter.java
class Daughter (line 3) | public class Daughter extends Parent{
method Daughter (line 5) | public Daughter(int age) {
method career (line 9) | @Override
method partner (line 14) | @Override
FILE: lectures/17-oop/code/src/com/kunal/abstractDemo/Main.java
class Main (line 3) | public class Main {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/abstractDemo/Parent.java
class Parent (line 3) | public abstract class Parent {
method Parent (line 8) | public Parent(int age) {
method hello (line 13) | static void hello(){
method normal (line 17) | void normal() {
method career (line 21) | abstract void career();
method partner (line 22) | abstract void partner();
FILE: lectures/17-oop/code/src/com/kunal/abstractDemo/Parent2.java
class Parent2 (line 3) | public abstract class Parent2 {
method Parent2 (line 8) | public Parent2(int age) {
method hello (line 13) | static void hello(){
method normal (line 17) | void normal() {
method career (line 21) | abstract void career();
method partner (line 22) | abstract void partner();
FILE: lectures/17-oop/code/src/com/kunal/abstractDemo/Son.java
class Son (line 3) | public class Son extends Parent {
method Son (line 5) | public Son(int age) {
method normal (line 9) | @Override
method career (line 14) | @Override
method partner (line 19) | @Override
FILE: lectures/17-oop/code/src/com/kunal/access/A.java
class A (line 3) | public class A {
method getNum (line 8) | public int getNum() {
method setNum (line 12) | public void setNum(int num) {
method A (line 16) | public A(int num, String name) {
FILE: lectures/17-oop/code/src/com/kunal/access/Main.java
class Main (line 5) | public class Main {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/access/ObjectDemo.java
class ObjectDemo (line 3) | public class ObjectDemo {
method ObjectDemo (line 8) | public ObjectDemo(int num, float gpa) {
method toString (line 14) | @Override
method finalize (line 19) | @Override
method hashCode (line 26) | @Override
method equals (line 31) | @Override
method clone (line 36) | @Override
method main (line 41) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/access/SubClass.java
class SubClass (line 3) | public class SubClass extends A{
method SubClass (line 5) | public SubClass(int num, String name) {
method main (line 9) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/cloning/Human.java
class Human (line 3) | public class Human implements Cloneable{
method Human (line 8) | public Human(int age, String name) {
method clone (line 20) | @Override
FILE: lectures/17-oop/code/src/com/kunal/cloning/Main.java
class Main (line 5) | public class Main {
method main (line 6) | public static void main(String[] args) throws CloneNotSupportedExcepti...
FILE: lectures/17-oop/code/src/com/kunal/collections/Main.java
class Main (line 5) | public class Main {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/enumExamples/A.java
type A (line 3) | public interface A {
method hello (line 4) | void hello();
FILE: lectures/17-oop/code/src/com/kunal/enumExamples/Basic.java
class Basic (line 3) | public class Basic {
type Week (line 4) | enum Week implements A{
method display (line 11) | void display() {
method Week (line 15) | Week() {
method hello (line 19) | @Override
method main (line 30) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/exceptionHandling/Demo.java
class Demo (line 3) | public class Demo {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/exceptionHandling/Main.java
class Main (line 3) | public class Main {
method main (line 4) | public static void main(String[] args) {
method divide (line 26) | static int divide(int a, int b) throws ArithmeticException{
FILE: lectures/17-oop/code/src/com/kunal/exceptionHandling/MyException.java
class MyException (line 3) | public class MyException extends Exception{
method MyException (line 5) | public MyException(String message) {
FILE: lectures/17-oop/code/src/com/kunal/generics/CustomArrayList.java
class CustomArrayList (line 6) | public class CustomArrayList {
method CustomArrayList (line 12) | public CustomArrayList() {
method add (line 16) | public void add(int num) {
method resize (line 23) | private void resize() {
method isFull (line 33) | private boolean isFull() {
method remove (line 37) | public int remove() {
method get (line 42) | public int get(int index) {
method size (line 46) | public int size() {
method set (line 50) | public void set(int index, int value) {
method toString (line 54) | @Override
method main (line 62) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/generics/CustomGenArrayList.java
class CustomGenArrayList (line 8) | public class CustomGenArrayList<T> {
method CustomGenArrayList (line 14) | public CustomGenArrayList() {
method add (line 18) | public void add(T num) {
method resize (line 25) | private void resize() {
method isFull (line 35) | private boolean isFull() {
method remove (line 39) | public T remove() {
method get (line 44) | public T get(int index) {
method size (line 48) | public int size() {
method set (line 52) | public void set(int index, T value) {
method toString (line 56) | @Override
method main (line 64) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/generics/GenericInterface.java
type GenericInterface (line 3) | public interface GenericInterface<T> {
method display (line 4) | void display(T value);
FILE: lectures/17-oop/code/src/com/kunal/generics/LambdaFunctions.java
class LambdaFunctions (line 6) | public class LambdaFunctions {
method main (line 7) | public static void main(String[] args) {
method operate (line 27) | private int operate(int a, int b, Operation op) {
type Operation (line 32) | interface Operation {
method operation (line 33) | int operation(int a, int b);
FILE: lectures/17-oop/code/src/com/kunal/generics/Main.java
class Main (line 3) | public class Main implements GenericInterface<Integer>{
method display (line 5) | @Override
FILE: lectures/17-oop/code/src/com/kunal/generics/WildcardExample.java
class WildcardExample (line 10) | public class WildcardExample<T extends Number> {
method WildcardExample (line 16) | public WildcardExample() {
method getList (line 20) | public void getList(List<? extends Number> list) {
method add (line 24) | public void add(T num) {
method resize (line 31) | private void resize() {
method isFull (line 41) | private boolean isFull() {
method remove (line 45) | public T remove() {
method get (line 50) | public T get(int index) {
method size (line 54) | public int size() {
method set (line 58) | public void set(int index, T value) {
method toString (line 62) | @Override
method main (line 70) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/generics/comparing/Main.java
class Main (line 6) | public class Main {
method main (line 7) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/generics/comparing/Student.java
class Student (line 3) | public class Student implements Comparable<Student>{
method Student (line 7) | public Student(int rollno, float marks) {
method toString (line 12) | @Override
method compareTo (line 17) | @Override
FILE: lectures/17-oop/code/src/com/kunal/interfaces/Brake.java
type Brake (line 3) | public interface Brake {
method brake (line 4) | void brake();
FILE: lectures/17-oop/code/src/com/kunal/interfaces/CDPlayer.java
class CDPlayer (line 3) | public class CDPlayer implements Media{
method start (line 5) | @Override
method stop (line 10) | @Override
FILE: lectures/17-oop/code/src/com/kunal/interfaces/Car.java
class Car (line 3) | public class Car implements Engine, Brake, Media{
method brake (line 7) | @Override
method start (line 12) | @Override
method stop (line 17) | @Override
method acc (line 22) | @Override
FILE: lectures/17-oop/code/src/com/kunal/interfaces/ElecticEngine.java
class ElecticEngine (line 3) | public class ElecticEngine implements Engine{
method start (line 5) | @Override
method stop (line 10) | @Override
method acc (line 15) | @Override
FILE: lectures/17-oop/code/src/com/kunal/interfaces/Engine.java
type Engine (line 3) | public interface Engine {
method start (line 7) | void start();
method stop (line 8) | void stop();
method acc (line 9) | void acc();
FILE: lectures/17-oop/code/src/com/kunal/interfaces/Main.java
class Main (line 3) | public class Main {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/interfaces/Media.java
type Media (line 3) | public interface Media {
method start (line 4) | void start();
method stop (line 5) | void stop();
FILE: lectures/17-oop/code/src/com/kunal/interfaces/NiceCar.java
class NiceCar (line 3) | public class NiceCar {
method NiceCar (line 7) | public NiceCar() {
method NiceCar (line 11) | public NiceCar(Engine engine) {
method start (line 15) | public void start() {
method stop (line 19) | public void stop() {
method startMusic (line 23) | public void startMusic() {
method stopMusic (line 27) | public void stopMusic() {
method upgradeEngine (line 31) | public void upgradeEngine() {
FILE: lectures/17-oop/code/src/com/kunal/interfaces/PowerEngine.java
class PowerEngine (line 3) | public class PowerEngine implements Engine{
method start (line 5) | @Override
method stop (line 10) | @Override
method acc (line 15) | @Override
FILE: lectures/17-oop/code/src/com/kunal/interfaces/extendDemo/A.java
type A (line 3) | public interface A {
method fun (line 4) | void fun();
FILE: lectures/17-oop/code/src/com/kunal/interfaces/extendDemo/B.java
type B (line 3) | public interface B extends A{
method greet (line 4) | void greet();
FILE: lectures/17-oop/code/src/com/kunal/interfaces/extendDemo/Main.java
class Main (line 3) | public class Main implements B{
method fun (line 4) | @Override
method greet (line 9) | @Override
FILE: lectures/17-oop/code/src/com/kunal/interfaces/extendDemo2/A.java
type A (line 3) | public interface A {
method greeting (line 6) | static void greeting() {
method fun (line 10) | default void fun() {
FILE: lectures/17-oop/code/src/com/kunal/interfaces/extendDemo2/B.java
type B (line 3) | public interface B{
method greet (line 4) | void greet();
FILE: lectures/17-oop/code/src/com/kunal/interfaces/extendDemo2/Main.java
class Main (line 3) | public class Main implements A, B {
method greet (line 4) | @Override
method main (line 9) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/interfaces/nested/A.java
class A (line 3) | public class A {
type NestedInterface (line 5) | public interface NestedInterface {
method isOdd (line 6) | boolean isOdd(int num);
class B (line 10) | class B implements A.NestedInterface {
method isOdd (line 11) | @Override
FILE: lectures/17-oop/code/src/com/kunal/interfaces/nested/Main.java
class Main (line 3) | public class Main {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/introduction/Main.java
class Main (line 7) | public class Main {
method main (line 8) | public static void main(String[] args) {
class Student (line 60) | class Student {
method greeting (line 70) | void greeting() {
method changeName (line 74) | void changeName(String name) {
method Student (line 78) | Student (Student other) {
method Student (line 84) | Student () {
method Student (line 93) | Student (int rno, String name, float marks) {
FILE: lectures/17-oop/code/src/com/kunal/introduction/WrapperExample.java
class WrapperExample (line 3) | public class WrapperExample {
method main (line 4) | public static void main(String[] args) {
method swap (line 36) | static void swap(Integer a, Integer b) {
class A (line 44) | class A {
method A (line 48) | public A(String name) {
method finalize (line 53) | @Override
FILE: lectures/17-oop/code/src/com/kunal/packages/a/Greeting.java
class Greeting (line 5) | public class Greeting {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/packages/b/Greeting.java
class Greeting (line 3) | public class Greeting {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/packages/b/Message.java
class Message (line 3) | public class Message {
method main (line 4) | public static void main(String[] args) {
method message (line 8) | public static void message() {
FILE: lectures/17-oop/code/src/com/kunal/properties/inheritance/Box.java
class Box (line 3) | public class Box {
method greeting (line 9) | static void greeting() {
method getL (line 13) | public double getL() {
method Box (line 17) | Box () {
method Box (line 24) | Box (double side) {
method Box (line 31) | Box(double l, double h, double w) {
method Box (line 38) | Box(Box old) {
FILE: lectures/17-oop/code/src/com/kunal/properties/inheritance/BoxColor.java
class BoxColor (line 3) | public class BoxColor extends BoxWeight {
FILE: lectures/17-oop/code/src/com/kunal/properties/inheritance/BoxPrice.java
class BoxPrice (line 3) | public class BoxPrice extends BoxWeight{
method BoxPrice (line 7) | BoxPrice () {
method BoxPrice (line 12) | BoxPrice(BoxPrice other) {
method BoxPrice (line 17) | public BoxPrice(double l, double h, double w, double weight, double co...
method BoxPrice (line 22) | public BoxPrice(double side, double weight, double cost) {
FILE: lectures/17-oop/code/src/com/kunal/properties/inheritance/BoxWeight.java
class BoxWeight (line 5) | public class BoxWeight extends Box{
method BoxWeight (line 8) | public BoxWeight() {
method greeting (line 13) | static void greeting() {
method BoxWeight (line 18) | BoxWeight (BoxWeight other) {
method BoxWeight (line 23) | BoxWeight(double side, double weight) {
method BoxWeight (line 28) | public BoxWeight(double l, double h, double w, double weight) {
FILE: lectures/17-oop/code/src/com/kunal/properties/inheritance/Main.java
class Main (line 3) | public class Main {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/properties/polymorphism/Circle.java
class Circle (line 3) | public class Circle extends Shapes{
method area (line 7) | @Override // this is called annotation
FILE: lectures/17-oop/code/src/com/kunal/properties/polymorphism/Main.java
class Main (line 3) | public class Main {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/properties/polymorphism/Numbers.java
class Numbers (line 3) | public class Numbers {
method sum (line 5) | double sum(double a, int b) {
method sum (line 9) | double sum(int a, int b) {
method sum (line 13) | int sum(int a, int b, int c) {
method main (line 17) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/properties/polymorphism/ObjectPrint.java
class ObjectPrint (line 3) | public class ObjectPrint {
method ObjectPrint (line 7) | public ObjectPrint(int num) {
method toString (line 11) | @Override
method main (line 18) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/properties/polymorphism/Shapes.java
class Shapes (line 3) | public class Shapes {
method area (line 4) | void area() {
FILE: lectures/17-oop/code/src/com/kunal/properties/polymorphism/Square.java
class Square (line 3) | public class Square extends Shapes{
method area (line 4) | void area() {
FILE: lectures/17-oop/code/src/com/kunal/properties/polymorphism/Triangle.java
class Triangle (line 3) | public class Triangle extends Shapes{
method area (line 4) | void area() {
FILE: lectures/17-oop/code/src/com/kunal/singleton/Main.java
class Main (line 5) | public class Main {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/singleton/NotSubClass.java
class NotSubClass (line 5) | public class NotSubClass{
method main (line 8) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/singleton/Singleton.java
class Singleton (line 5) | public class Singleton {
method Singleton (line 6) | private Singleton () {
method getInstance (line 12) | public static Singleton getInstance() {
FILE: lectures/17-oop/code/src/com/kunal/singleton/SubClass.java
class SubClass (line 8) | public class SubClass extends A {
method SubClass (line 10) | public SubClass(int num, String name) {
method main (line 14) | public static void main(String[] args) {
class SubSubclass (line 20) | class SubSubclass extends SubClass {
method SubSubclass (line 22) | public SubSubclass(int num, String name) {
method main (line 26) | public static void main(String[] args) {
class SubClass2 (line 32) | class SubClass2 extends A {
method SubClass2 (line 34) | public SubClass2(int num, String name) {
method main (line 38) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/staticExample/Human.java
class Human (line 3) | public class Human {
method message (line 10) | static void message() {
method Human (line 15) | public Human(int age, String name, int salary, boolean married) {
FILE: lectures/17-oop/code/src/com/kunal/staticExample/InnerClasses.java
class InnerClasses (line 5) | public class InnerClasses {
class Test (line 7) | static class Test {
method Test (line 9) | public Test(String name) {
method toString (line 13) | @Override
method main (line 19) | public static void main(String[] args) {
FILE: lectures/17-oop/code/src/com/kunal/staticExample/Main.java
class Main (line 3) | public class Main {
method main (line 4) | public static void main(String[] args) {
method fun (line 19) | static void fun() {
method fun2 (line 31) | void fun2() {
method greeting (line 36) | void greeting() {
FILE: lectures/17-oop/code/src/com/kunal/staticExample/StaticBlock.java
class StaticBlock (line 4) | public class StaticBlock {
method main (line 14) | public static void main(String[] args) {
FILE: lectures/18-linkedlist/code/src/com/kunal/CLL.java
class CLL (line 3) | public class CLL {
method CLL (line 8) | public CLL() {
method insert (line 13) | public void insert(int val) {
method display (line 26) | public void display() {
method delete (line 39) | public void delete(int val) {
class Node (line 68) | private class Node {
method Node (line 72) | public Node(int val) {
FILE: lectures/18-linkedlist/code/src/com/kunal/DLL.java
class DLL (line 3) | public class DLL {
method insertFirst (line 7) | public void insertFirst(int val) {
method display (line 17) | public void display() {
method insertLast (line 35) | public void insertLast(int val) {
method find (line 55) | public Node find(int value) {
method insert (line 66) | public void insert(int after, int val) {
class Node (line 83) | private class Node {
method Node (line 88) | public Node(int val) {
method Node (line 92) | public Node(int val, Node next, Node prev) {
FILE: lectures/18-linkedlist/code/src/com/kunal/InterviewQuestions.java
class InterviewQuestions (line 5) | public class InterviewQuestions {
method hasCycle (line 9) | public boolean hasCycle(ListNode head) {
method lengthCycle (line 24) | public int lengthCycle(ListNode head) {
method detectCycle (line 46) | public ListNode detectCycle(ListNode head) {
method isHappy (line 83) | public boolean isHappy(int n) {
method findSquare (line 97) | private int findSquare(int number) {
method middleNode (line 109) | public ListNode middleNode(ListNode head) {
method reverseList (line 124) | public ListNode reverseList(ListNode head) {
method reverseBetween (line 144) | public ListNode reverseBetween(ListNode head, int left, int right) {
method reverseKGroup (line 183) | public ListNode reverseKGroup(ListNode head, int k) {
method getLength (line 221) | public int getLength(ListNode head) {
method reverseAlternateKGroup (line 232) | public ListNode reverseAlternateKGroup(ListNode head, int k) {
method isPalindrome (line 276) | public boolean isPalindrome(ListNode head) {
method reorderList (line 296) | public void reorderList(ListNode head) {
method rotateRight (line 324) | public ListNode rotateRight(ListNode head, int k) {
class ListNode (line 354) | class ListNode {
method ListNode (line 358) | public ListNode() {
method ListNode (line 361) | ListNode(int x) {
FILE: lectures/18-linkedlist/code/src/com/kunal/LL.java
class LL (line 3) | public class LL {
method LL (line 9) | public LL() {
method insertFirst (line 13) | public void insertFirst(int val) {
method insertLast (line 24) | public void insertLast(int val) {
method insert (line 35) | public void insert(int val, int index) {
method insertRec (line 57) | public void insertRec(int val, int index) {
method insertRec (line 60) | private Node insertRec(int val, int index, Node node) {
method deleteLast (line 72) | public int deleteLast() {
method delete (line 85) | public int delete(int index) {
method find (line 101) | public Node find(int value) {
method get (line 112) | public Node get(int index) {
method deleteFirst (line 120) | public int deleteFirst() {
method display (line 130) | public void display() {
class Node (line 139) | private class Node {
method Node (line 143) | public Node(int value) {
method Node (line 147) | public Node(int value, Node next) {
method duplicates (line 154) | public void duplicates() {
method merge (line 170) | public static LL merge(LL first, LL second) {
method bubbleSort (line 199) | public void bubbleSort() {
method bubbleSort (line 203) | private void bubbleSort(int row, int col) {
method reverse (line 238) | private void reverse(Node node) {
method reverse (line 251) | public void reverse() {
method main (line 272) | public static void main(String[] args) {
FILE: lectures/18-linkedlist/code/src/com/kunal/Main.java
class Main (line 3) | public class Main {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/18-linkedlist/code/src/com/kunal/MergeSort.java
class MergeSort (line 3) | public class MergeSort {
method sortList (line 5) | public ListNode sortList(ListNode head) {
method merge (line 17) | ListNode merge(ListNode list1, ListNode list2) {
method getMid (line 35) | ListNode getMid(ListNode head) {
FILE: lectures/19-stacks-n-queues/code/src/com/kunal/CircularQueue.java
class CircularQueue (line 3) | public class CircularQueue {
method CircularQueue (line 11) | public CircularQueue(){
method CircularQueue (line 15) | public CircularQueue(int size) {
method isFull (line 19) | public boolean isFull() {
method isEmpty (line 23) | public boolean isEmpty() {
method insert (line 27) | public boolean insert(int item) {
method remove (line 37) | public int remove() throws Exception {
method front (line 48) | public int front() throws Exception{
method display (line 55) | public void display() {
FILE: lectures/19-stacks-n-queues/code/src/com/kunal/CustomQueue.java
class CustomQueue (line 3) | public class CustomQueue {
method CustomQueue (line 10) | public CustomQueue(){
method CustomQueue (line 14) | public CustomQueue(int size) {
method isFull (line 18) | public boolean isFull() {
method isEmpty (line 22) | public boolean isEmpty() {
method insert (line 26) | public boolean insert(int item) {
method remove (line 34) | public int remove() throws Exception {
method front (line 49) | public int front() throws Exception{
method display (line 56) | public void display() {
FILE: lectures/19-stacks-n-queues/code/src/com/kunal/CustomStack.java
class CustomStack (line 3) | public class CustomStack {
method CustomStack (line 9) | public CustomStack(){
method CustomStack (line 13) | public CustomStack(int size) {
method push (line 17) | public boolean push(int item) {
method pop (line 27) | public int pop() throws StackException {
method peek (line 37) | public int peek() throws StackException {
method isFull (line 44) | public boolean isFull() {
method isEmpty (line 48) | public boolean isEmpty() {
FILE: lectures/19-stacks-n-queues/code/src/com/kunal/DynamicQueue.java
class DynamicQueue (line 3) | public class DynamicQueue extends CircularQueue{
method DynamicQueue (line 4) | public DynamicQueue() {
method DynamicQueue (line 8) | public DynamicQueue(int size) {
method insert (line 12) | @Override
FILE: lectures/19-stacks-n-queues/code/src/com/kunal/DynamicStack.java
class DynamicStack (line 3) | public class DynamicStack extends CustomStack{
method DynamicStack (line 5) | public DynamicStack() {
method DynamicStack (line 9) | public DynamicStack(int size) {
method push (line 13) | @Override
FILE: lectures/19-stacks-n-queues/code/src/com/kunal/InBuiltExamples.java
class InBuiltExamples (line 5) | public class InBuiltExamples {
method main (line 7) | public static void main(String[] args) {
FILE: lectures/19-stacks-n-queues/code/src/com/kunal/QueueMain.java
class QueueMain (line 3) | public class QueueMain {
method main (line 4) | public static void main(String[] args) throws Exception {
FILE: lectures/19-stacks-n-queues/code/src/com/kunal/StackException.java
class StackException (line 3) | public class StackException extends Exception{
method StackException (line 5) | public StackException(String message) {
FILE: lectures/19-stacks-n-queues/code/src/com/kunal/StackMain.java
class StackMain (line 3) | public class StackMain {
method main (line 4) | public static void main(String[] args) throws StackException {
FILE: lectures/19-stacks-n-queues/questions/LargestAreaHistogram.java
class Main (line 3) | class Main {
method main (line 4) | public static void main(String[] args) {
method largestRectangleArea (line 8) | public int largestRectangleArea(int[] heights) {
method getMax (line 29) | private static int getMax(int[] arr, Stack<Integer> stack, int max, in...
FILE: lectures/19-stacks-n-queues/questions/QueueUsingStack.java
class QueueUsingStack (line 3) | public class QueueUsingStack {
method QueueUsingStack (line 7) | public QueueUsingStack() {
method add (line 12) | public void add(int item) {
method remove (line 16) | public int remove() throws Exception {
method peek (line 27) | public int peek() throws Exception {
method isEmpty (line 40) | public boolean isEmpty() {
FILE: lectures/19-stacks-n-queues/questions/QueueUsingStackRemove.java
class QueueUsingStackRemove (line 3) | public class QueueUsingStackRemove {
method QueueUsingStackRemove (line 7) | public QueueUsingStackRemove() {
method add (line 12) | public void add(int item) throws Exception {
method remove (line 22) | public int remove() throws Exception {
method peek (line 26) | public int peek() throws Exception {
method isEmpty (line 30) | public boolean isEmpty() {
FILE: lectures/19-stacks-n-queues/questions/TwoStacks.java
class TwoStacks (line 3) | class TwoStacks {
method twoStacks (line 4) | static int twoStacks(int x, int[] a, int[] b) {
method twoStacks (line 8) | private static int twoStacks(int x, int[] a, int[] b, int sum, int cou...
method main (line 23) | public static void main(String[] args) {
FILE: lectures/19-stacks-n-queues/questions/ValidParenMinAdd.java
class Solution (line 2) | class Solution {
method minAddToMakeValid (line 3) | public int minAddToMakeValid(String s) {
FILE: lectures/19-stacks-n-queues/questions/ValidParenthesis.java
class Solution (line 3) | class Solution {
method isValid (line 4) | public boolean isValid(String s) {
FILE: lectures/20-trees/code/AVL/AVL.java
class AVL (line 1) | class AVL {
class Node (line 3) | public class Node {
method Node (line 9) | public Node(int value) {
method getValue (line 13) | public int getValue() {
method AVL (line 20) | public AVL() {
method height (line 24) | public int height() {
method height (line 27) | private int height(Node node) {
method insert (line 34) | public void insert(int value) {
method insert (line 38) | private Node insert(int value, Node node) {
method rotate (line 56) | private Node rotate(Node node) {
method rightRotate (line 86) | public Node rightRotate(Node p) {
method leftRotate (line 99) | public Node leftRotate(Node c) {
method populate (line 112) | public void populate(int[] nums) {
method populatedSorted (line 118) | public void populatedSorted(int[] nums) {
method populatedSorted (line 122) | private void populatedSorted(int[] nums, int start, int end) {
method display (line 134) | public void display() {
method display (line 138) | private void display(Node node, String details) {
method isEmpty (line 147) | public boolean isEmpty() {
method balanced (line 151) | public boolean balanced() {
method balanced (line 155) | private boolean balanced(Node node) {
FILE: lectures/20-trees/code/AVL/Main.java
class Main (line 1) | class Main {
method main (line 2) | public static void main(String[] args) {
FILE: lectures/20-trees/code/Advance questions/DoubleLinkedList.java
class DoubleLinkedList (line 1) | public class DoubleLinkedList {
method convert (line 5) | public TreeNode convert(TreeNode root) {
method helper (line 15) | private void helper(TreeNode node) {
class LLNode (line 39) | class LLNode {
method LLNode (line 44) | public LLNode (int val) {
class TreeNode (line 49) | class TreeNode {
method TreeNode (line 54) | public TreeNode (int val) {
FILE: lectures/20-trees/code/Advance questions/KthSmallest.java
class KthSmallest (line 1) | class KthSmallest {
method kthSmallest (line 2) | public int kthSmallest(TreeNode root, int k) {
method helper (line 14) | private void helper(TreeNode node, PriorityQueue<Integer> minHeap, int...
FILE: lectures/20-trees/code/Advance questions/KthSmallest2.java
class KthSmallest (line 1) | class KthSmallest {
method kthSmallest (line 5) | public int kthSmallest(TreeNode root, int k) {
method helper (line 11) | private void helper(TreeNode node) {
FILE: lectures/20-trees/code/Advance questions/Main.java
class Main (line 1) | class Main {
method main (line 2) | public static void main(String[] args) {
FILE: lectures/20-trees/code/Advance questions/PreIn.java
class PreIn (line 1) | class PreIn {
method buildTree (line 3) | public TreeNode buildTree(int[] preOrder, int[] inOrder) {
method helper (line 15) | public TreeNode helper(int[] preOrder, int[] inOrder, int left, int ri...
FILE: lectures/20-trees/code/Advance questions/TwoNodeSwap.java
class Node (line 3) | class Node {
method Node (line 7) | public Node (int val) {
class TwoNodeSwap (line 12) | public class TwoNodeSwap {
method helper (line 17) | public void helper(Node root) {
method iot (line 26) | private void iot(Node node) {
method printIOT (line 45) | public void printIOT(Node node) {
FILE: lectures/20-trees/code/Advance questions/TwoSum.java
class TwoSum (line 1) | class TwoSum {
method findTarget (line 2) | public boolean findTarget(TreeNode root, int k) {
method helper (line 6) | private boolean helper(TreeNode node, int k, HashSet<Integer> set) {
FILE: lectures/20-trees/code/Advance questions/VerticalTraversal.java
class VerticalTraversal (line 1) | class VerticalTraversal {
method verticalTraversal (line 2) | public List<List<Integer>> verticalTraversal(TreeNode node) {
FILE: lectures/20-trees/code/Advance questions/WordLadder.java
class WordLadder (line 1) | public class WordLadder {
method ladderLength (line 2) | public static int ladderLength(String beginWord, String endWord, List<...
FILE: lectures/20-trees/code/Questions/BFS.java
class BFS (line 1) | class BFS {
method levelOrder (line 2) | public List<List<Integer>> levelOrder(TreeNode root) {
method rightSideView (line 30) | public List<Integer> rightSideView(TreeNode root) {
method averageOfLevels (line 61) | public List<Double> averageOfLevels(TreeNode root) {
method findSuccessor (line 90) | public TreeNode findSuccessor(TreeNode root, int key){
method zigzagLevelOrder (line 114) | public List<List<Integer>> zigzagLevelOrder(TreeNode root) {
method connect (line 157) | public Node connect(Node root) {
method isCousins (line 179) | public boolean isCousins(TreeNode root, int x, int y) {
method findNode (line 188) | TreeNode findNode(TreeNode node, int x) {
method isSibling (line 202) | boolean isSibling (TreeNode node, TreeNode x, TreeNode y) {
method level (line 213) | int level (TreeNode node, TreeNode x, int lev) {
method isSymmetric (line 229) | public boolean isSymmetric(TreeNode root) {
FILE: lectures/20-trees/code/Questions/DFS.java
class DFS (line 1) | class DFS {
method dfsStack (line 4) | void dfsStack(Node node) {
method diameterOfBinaryTree (line 24) | public int diameterOfBinaryTree(TreeNode root) {
method height (line 28) | int height(TreeNode node) {
method invertTree (line 44) | public TreeNode invertTree(TreeNode root) {
method flatten (line 58) | public void flatten(TreeNode root) {
method isValidBST (line 76) | public boolean isValidBST(TreeNode root) {
method helper (line 79) | public boolean helper(TreeNode node, Integer low, Integer high) {
method lowestCommonAncestor (line 99) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo...
method kthSmallest (line 120) | public int kthSmallest(TreeNode root, int k) {
method helper (line 123) | public TreeNode helper(TreeNode root, int k) {
method buildTree (line 143) | public TreeNode buildTree(int[] preorder, int[] inorder) {
FILE: lectures/20-trees/code/Questions/Main.java
class Main (line 1) | class Main {
method main (line 2) | public static void main(String[] args) {
FILE: lectures/20-trees/code/Questions/PathSum.java
class PathSum (line 1) | class PathSum {
method hasPathSum (line 2) | public boolean hasPathSum(TreeNode root, int sum) {
method sumNumbers (line 12) | public int sumNumbers(TreeNode root) {
method helper (line 15) | int helper(TreeNode node, int sum) {
method maxPathSum (line 27) | public int maxPathSum(TreeNode root) {
method helper (line 31) | int helper(TreeNode node) {
method findPath (line 49) | boolean findPath(Node node, int[] arr) {
method helper (line 55) | boolean helper(Node node, int[] arr, int index) {
method countPaths (line 68) | int countPaths(Node node, int sum) {
method helper (line 72) | int helper(Node node, int sum, List<Integer> path) {
method findPaths (line 99) | List<List<Integer>> findPaths(Node node, int sum) {
method helper (line 105) | void helper(Node node, int sum, List<Integer> path, List<List<Integer>...
FILE: lectures/20-trees/code/Questions/SD.java
class SD (line 3) | class SD {
method serialize (line 4) | public List<String> serialize(Node node) {
method helper (line 9) | void helper(Node node, List<String> list) {
method deserialize (line 21) | Node deserialize(List<String> list) {
method helper (line 26) | Node helper(List<String> list) {
FILE: lectures/20-trees/code/Segment trees/Main.java
class Main (line 1) | class Main {
method main (line 2) | public static void main(String[] args) {
FILE: lectures/20-trees/code/Segment trees/SegmentTree.java
class SegmentTree (line 1) | class SegmentTree {
class Node (line 3) | private static class Node {
method Node (line 10) | public Node (int startInterval, int endInterval) {
method SegmentTree (line 18) | public SegmentTree(int[] arr) {
method constructTree (line 23) | private Node constructTree(int[] arr, int start, int end) {
method display (line 43) | public void display() {
method display (line 46) | private void display(Node node) {
method query (line 77) | public int query(int qsi, int qei) {
method query (line 80) | private int query(Node node, int qsi, int qei) {
method update (line 93) | public void update(int index, int value) {
method update (line 96) | private int update(Node node, int index, int value) {
FILE: lectures/20-trees/code/introduction/BST.java
class BST (line 1) | class BST {
class Node (line 2) | public class Node {
method Node (line 8) | public Node(int value) {
method getValue (line 12) | public int getValue() {
method BST (line 19) | public BST() {
method height (line 23) | public int height(Node node) {
method isEmpty (line 30) | public boolean isEmpty() {
method insert (line 34) | public void insert(int value) {
method insert (line 38) | private Node insert(int value, Node node) {
method populate (line 56) | public void populate(int[] nums) {
method populatedSorted (line 62) | public void populatedSorted(int[] nums) {
method populatedSorted (line 66) | private void populatedSorted(int[] nums, int start, int end) {
method balanced (line 78) | public boolean balanced() {
method balanced (line 82) | private boolean balanced(Node node) {
method display (line 89) | public void display() {
method display (line 93) | private void display(Node node, String details) {
FILE: lectures/20-trees/code/introduction/BinaryTree.java
class BinaryTree (line 3) | class BinaryTree {
method BinaryTree (line 5) | public BinaryTree() {
class Node (line 9) | private static class Node {
method Node (line 14) | public Node(int value) {
method populate (line 22) | public void populate(Scanner scanner) {
method populate (line 29) | private void populate(Scanner scanner, Node node) {
method display (line 50) | public void display() {
method display (line 54) | private void display(Node node, String indent) {
method prettyDisplay (line 63) | public void prettyDisplay() {
method prettyDisplay (line 67) | private void prettyDisplay(Node node, int level) {
method preOrder (line 85) | public void preOrder() {
method preOrder (line 89) | private void preOrder(Node node) {
method inOrder (line 98) | public void inOrder() {
method inOrder (line 102) | private void inOrder(Node node) {
method postOrder (line 111) | public void postOrder() {
method postOrder (line 115) | private void postOrder(Node node) {
FILE: lectures/20-trees/code/introduction/Main.java
class Main (line 3) | public class Main {
method main (line 4) | public static void main(String[] args) {
FILE: lectures/21-StringBuffer/code/Main.java
class Main (line 5) | class Main {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/21-StringBuffer/code/RandomString.java
class RandomString (line 3) | class RandomString {
method generate (line 4) | static String generate(int size) {
FILE: lectures/22-large numbers/code/Factorial.java
class Factorial (line 3) | class Factorial {
method fact (line 5) | static BigInteger fact(int num) {
FILE: lectures/22-large numbers/code/Main.java
class Main (line 4) | class Main {
method main (line 5) | public static void main(String[] args) {
method BD (line 9) | static void BD() {
method BI (line 36) | static void BI() {
FILE: lectures/23-file handling/code/Input.java
class Input (line 3) | class Input {
method input (line 4) | static void input() {
FILE: lectures/23-file handling/code/Main.java
class Main (line 5) | class Main {
method main (line 6) | public static void main(String[] args) {
FILE: lectures/23-file handling/code/Output.java
class Output (line 3) | class Output {
method output (line 4) | static void output() {
FILE: lectures/24-heaps/code/heaps-1/Heap.java
class Heap (line 3) | class Heap<T extends Comparable<T>> {
method Heap (line 7) | public Heap() {
method swap (line 11) | private void swap(int first, int second) {
method parent (line 17) | private int parent(int index) {
method left (line 21) | private int left(int index) {
method right (line 25) | private int right(int index) {
method insert (line 29) | public void insert(T value) {
method upheap (line 33) | private void upheap(int index) {
method remove (line 44) | public T remove() throws Exception {
method downheap (line 59) | private void downheap(int index) {
method heapSort (line 78) | public ArrayList<T> heapSort() throws Exception {
FILE: lectures/24-heaps/code/heaps-1/Main.java
class Main (line 3) | class Main {
method main (line 4) | public static void main(String[] args) throws Exception{
FILE: lectures/25-hashmaps/code/Hashmaps introduction/HashMapFinal.java
class HashMapFinal (line 3) | public class HashMapFinal<K, V> {
method HashMapFinal (line 10) | public HashMapFinal() {
method put (line 17) | public void put(K key, V value) {
method reHash (line 38) | private void reHash() {
method get (line 57) | public V get(K key) {
method remove (line 68) | public void remove(K key) {
method containsKey (line 85) | public boolean containsKey(K key) {
method toString (line 89) | @Override
class Entity (line 106) | private class Entity {
method Entity (line 110) | public Entity(K key, V value) {
FILE: lectures/25-hashmaps/code/Hashmaps introduction/Main.java
class MapUsingHash (line 3) | class MapUsingHash {
method MapUsingHash (line 7) | public MapUsingHash() {
method put (line 11) | public void put(String key, String value) {
method get (line 16) | public String get(String key) {
method remove (line 24) | public void remove(String key) {
class Entity (line 31) | private class Entity {
method Entity (line 35) | public Entity(String key, String value) {
class Main (line 44) | class Main {
method main (line 45) | public static void main(String[] args) {
method hashDemo (line 58) | public static void hashDemo() {
FILE: lectures/25-hashmaps/code/KarpRabin/KarpRabin.java
class KarpRabin (line 1) | public class KarpRabin {
method calculateHash (line 4) | private double calculateHash(String str) {
method updateHash (line 12) | private double updateHash(double prevHash, char oldChar, char newChar,...
method search (line 18) | public void search(String text, String pattern) {
FILE: lectures/25-hashmaps/code/KarpRabin/Main.java
class Main (line 1) | class Main {
method main (line 2) | public static void main(String[] args) {
FILE: lectures/26-advance-sorting/CountSort/Main.java
class Main (line 3) | class Main {
method countSort (line 5) | public static void countSort(int[] array) {
method countSortHash (line 34) | public static void countSortHash(int[] arr) {
method main (line 59) | public static void main(String[] args) {
FILE: lectures/26-advance-sorting/RadixSort/Main.java
class Main (line 3) | class Main {
method radixSort (line 5) | public static void radixSort(int[] arr) {
method countSort (line 14) | private static void countSort(int[] arr, int exp) {
method main (line 44) | public static void main(String[] args) {
FILE: lectures/27-huffman-coding/code/Heap.java
class Heap (line 3) | public class Heap<T extends Comparable<T>>{
method Heap (line 7) | public Heap(){
method insert (line 11) | public void insert(T value){
method size (line 15) | public int size(){
method upheap (line 18) | private void upheap(int index){
method remove (line 32) | public T remove() throws Exception{
method downheap (line 48) | private void downheap(int index) {
method swap (line 70) | private void swap(int first, int second) {
method parent (line 76) | private int parent(int index){
method left (line 80) | private int left(int index){
method right (line 84) | private int right(int index){
method heapSort (line 88) | public ArrayList<T> heapSort() throws Exception {
FILE: lectures/27-huffman-coding/code/HuffmanCoder.java
class HuffmanCoder (line 3) | class HuffmanCoder {
class Node (line 7) | private class Node implements Comparable<Node> {
method Node (line 13) | public Node(Character data, int cost) {
method compareTo (line 20) | @Override
method HuffmanCoder (line 26) | public HuffmanCoder(String feeder) throws Exception {
method initEncoderDecoder (line 67) | private void initEncoderDecoder(Node node, String osf) {
method encode (line 79) | public String encode(String source) {
method decode (line 91) | public String decode(String codedString) {
FILE: lectures/27-huffman-coding/code/Main.java
class Main (line 1) | class Main {
method main (line 2) | public static void main(String[] args) throws Exception{
FILE: lectures/28-sqrt-decomposition/code/Main.java
class Main (line 3) | class Main {
method main (line 4) | public static void main(String[] args) {
method query (line 26) | public static int query(int[] blocks, int[] arr, int l, int r, int sqr...
method update (line 50) | public void update(int[] blocks, int[] arr, int i, int val, int sqrt) {
Condensed preview — 453 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (556K chars).
[
{
"path": ".gitignore",
"chars": 3293,
"preview": "\n# Created by https://www.toptal.com/developers/gitignore/api/macos,intellij,java\n# Edit at https://www.toptal.com/devel"
},
{
"path": "README.md",
"chars": 411,
"preview": "# DSA + Interview preparation bootcamp\n- Subscribe to the [YouTube channel](https://www.youtube.com/KunalKushwaha?sub_co"
},
{
"path": "SYLLABUS.md",
"chars": 10179,
"preview": "- [Complete Git & GitHub Course](https://youtu.be/apGV9Kg7ics)\n- [Introduction to Programming](https://youtu.be/wn49bJOY"
},
{
"path": "assignments/01-flow-of-program.md",
"chars": 418,
"preview": "[Video Link](https://youtu.be/lhELGQAV4gg)\n\n## Create flowchart and pseudocode for the following:\n\n1. Input a year and f"
},
{
"path": "assignments/02-first-java.md",
"chars": 730,
"preview": "# [Video Link](https://youtu.be/TAtrPoaJ7gc)\n\n## Write Java programs for the following:\n\n1. Write a program to print whe"
},
{
"path": "assignments/03-conditionals-loops.md",
"chars": 2266,
"preview": "# [Video Link](https://youtu.be/ldYLYRNaucM)\n## Write Java programs for the following: \n\n### Basic Java Programs\n1. Area"
},
{
"path": "assignments/04-functions.md",
"chars": 3029,
"preview": "# [Video Link](https://youtu.be/vvanI8NRlSI)\n\n1. [Define two methods to print the maximum and the minimum number respect"
},
{
"path": "assignments/05-arrays.md",
"chars": 3790,
"preview": "# [Video Link](https://youtu.be/n60Dn0UsbEk)\n\n## Submit the following on your Leetcode profile itself.\n\n### Easy\n1. [Bui"
},
{
"path": "assignments/06-searching.md",
"chars": 4147,
"preview": "# Videos:\n- [Linear Search](https://youtu.be/_HRA37X8N_Q)\n- [Binary Search](https://youtu.be/f6UU7V3szVw)\n- [Binary Sear"
},
{
"path": "assignments/07-sorting.md",
"chars": 4197,
"preview": "# Videos\r\n- [Bubble Sort](https://youtu.be/F5MZyqRp_IM)\r\n- [Selection Sort](https://youtu.be/Nd4SCCIHFWk)\r\n- [Insertion "
},
{
"path": "assignments/08-strings.md",
"chars": 5079,
"preview": "# [Video Link](https://youtu.be/zL1DPZ0Ovlo)\r\n\r\n# Problems\r\n\r\n## Easy\r\n\r\n- [Defanging an Ip address](https://leetcode.co"
},
{
"path": "assignments/09-patterns.md",
"chars": 3138,
"preview": "Pattern Questions\n\nPrint these patterns using loops:\n\n```text\n\n1. *****\n *****\n *****\n *****\n *****\n\n\n2. *"
},
{
"path": "assignments/10-recursion.md",
"chars": 8517,
"preview": "# Videos\n- [Complete Recursion Course](https://www.youtube.com/playlist?list=PL9gnSGHSqcnp39cTyB1dTZ2pJ04Xmdrod)\n\n# Prob"
},
{
"path": "assignments/11-bitwise.md",
"chars": 2620,
"preview": "# [Video link](https://youtu.be/fzip9Aml6og)\n\n## Problems\n\n## Easy\n- [Add Binary](https://leetcode.com/problems/add-bina"
},
{
"path": "assignments/12-math.md",
"chars": 2626,
"preview": "# [Video link](https://youtu.be/lmSpZ0bjCyQ)\n\n## Problems\n- Click on [*Show problem tags*](https://leetcode.com/tag/math"
},
{
"path": "assignments/13-complexities.md",
"chars": 506,
"preview": "<h1>Recurrence Questions:</h1>\n<p align=\"\">\n <img src=\"https://github.com/crishabhkumar/crishabhkumar/blob/main/Extra%2"
},
{
"path": "assignments/14-oop.md",
"chars": 4366,
"preview": "# Important Topics\n\n- [Kunal's notes](https://github.com/kunal-kushwaha/DSA-Bootcamp-Java/tree/main/lectures/17-oop/note"
},
{
"path": "assignments/15-linkedlist.md",
"chars": 5010,
"preview": "# Problems\n\n## Easy\n- [Convert Binary Number in a Linked List to Integer](https://leetcode.com/problems/convert-binary-n"
},
{
"path": "assignments/16-stack-queue.md",
"chars": 3463,
"preview": "# Problems\n\n## Easy\n- [Next greater element I](https://leetcode.com/problems/next-greater-element-i/) `leetcode`\n- [Vali"
},
{
"path": "assignments/17-trees.md",
"chars": 6085,
"preview": "# Problems\n\n## Easy\n\n- [Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/) `le"
},
{
"path": "assignments/18-heaps.md",
"chars": 1,
"preview": "\n"
},
{
"path": "lectures/05-first-java-program/first-idea-program/.idea/.gitignore",
"chars": 47,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n"
},
{
"path": "lectures/05-first-java-program/first-idea-program/.idea/description.html",
"chars": 97,
"preview": "<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>"
},
{
"path": "lectures/05-first-java-program/first-idea-program/.idea/encodings.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\">\n <file url=\"PROJECT\" chars"
},
{
"path": "lectures/05-first-java-program/first-idea-program/.idea/misc.xml",
"chars": 499,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"EntryPointsManager\">\n <entry_points v"
},
{
"path": "lectures/05-first-java-program/first-idea-program/.idea/modules.xml",
"chars": 276,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "lectures/05-first-java-program/first-idea-program/.idea/project-template.xml",
"chars": 89,
"preview": "<template>\n <input-field default=\"com.company\">IJ_BASE_PACKAGE</input-field>\n</template>"
},
{
"path": "lectures/05-first-java-program/first-idea-program/.idea/vcs.xml",
"chars": 189,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "lectures/05-first-java-program/first-idea-program/first-idea-program.iml",
"chars": 423,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "lectures/05-first-java-program/first-idea-program/src/com/kunal/Basics.java",
"chars": 454,
"preview": "package com.kunal;\n\npublic class Basics {\n public static void main(String[] args) {\n// int a = 10;\n// i"
},
{
"path": "lectures/05-first-java-program/first-idea-program/src/com/kunal/Inputs.java",
"chars": 486,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class Inputs {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/05-first-java-program/first-idea-program/src/com/kunal/Main.java",
"chars": 214,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/05-first-java-program/first-idea-program/src/com/kunal/Prime.java",
"chars": 666,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class Prime {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/05-first-java-program/first-idea-program/src/com/kunal/Primitives.java",
"chars": 409,
"preview": "package com.kunal;\n\npublic class Primitives {\n public static void main(String[] args) {\n int rollno = 64;\n "
},
{
"path": "lectures/05-first-java-program/first-idea-program/src/com/kunal/Sum.java",
"chars": 326,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class Sum {\n public static void main(String[] args) {\n S"
},
{
"path": "lectures/05-first-java-program/first-idea-program/src/com/kunal/Temperature.java",
"chars": 341,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class Temperature {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/05-first-java-program/first-idea-program/src/com/kunal/TypeCasting.java",
"chars": 1129,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class TypeCasting {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/05-first-java-program/first-tutorial/Demo.java",
"chars": 109,
"preview": "public class Demo {\n public static void main(String[] args) {\n System.out.println(args[1]);\n }\n}"
},
{
"path": "lectures/05-first-java-program/first-tutorial/Main.java",
"chars": 109,
"preview": "public class Demo {\n public static void main(String[] args) {\n System.out.println(args[0]);\n }\n}"
},
{
"path": "lectures/05-first-java-program/notes/literals.txt",
"chars": 2765,
"preview": "Literals: Java Literals are syntactic representations of boolean, character, numeric, or string data.\nExample: 4 is an i"
},
{
"path": "lectures/05-first-java-program/notes/notes.txt",
"chars": 1576,
"preview": "Terminal: echo $PATH\t# This is where it looks for the applications that we want to open.\n\nClass name always starts with "
},
{
"path": "lectures/05-first-java-program/notes/type_conversion&casting.txt",
"chars": 3643,
"preview": "Type Conversion and Casting:\n\nJava’s Automatic Conversions\nWhen one type of data is assigned to another type of variable"
},
{
"path": "lectures/06-conditions-loops/code/.idea/.gitignore",
"chars": 47,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n"
},
{
"path": "lectures/06-conditions-loops/code/.idea/description.html",
"chars": 97,
"preview": "<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>"
},
{
"path": "lectures/06-conditions-loops/code/.idea/encodings.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\">\n <file url=\"PROJECT\" chars"
},
{
"path": "lectures/06-conditions-loops/code/.idea/misc.xml",
"chars": 409,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectKey\">\n <option name=\"state\" va"
},
{
"path": "lectures/06-conditions-loops/code/.idea/modules.xml",
"chars": 248,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "lectures/06-conditions-loops/code/.idea/project-template.xml",
"chars": 89,
"preview": "<template>\n <input-field default=\"com.company\">IJ_BASE_PACKAGE</input-field>\n</template>"
},
{
"path": "lectures/06-conditions-loops/code/.idea/uiDesigner.xml",
"chars": 8792,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Palette2\">\n <group name=\"Swing\">\n "
},
{
"path": "lectures/06-conditions-loops/code/.idea/vcs.xml",
"chars": 189,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "lectures/06-conditions-loops/code/code.iml",
"chars": 423,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "lectures/06-conditions-loops/code/src/com/kunal/Calculator.java",
"chars": 1410,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class Calculator {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/06-conditions-loops/code/src/com/kunal/CaseCheck.java",
"chars": 373,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class CaseCheck {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/06-conditions-loops/code/src/com/kunal/Conditionals.java",
"chars": 871,
"preview": "package com.kunal;\n\npublic class Conditionals {\n\n public static void main(String[] args) {\n /*\n Syn"
},
{
"path": "lectures/06-conditions-loops/code/src/com/kunal/CountNums.java",
"chars": 347,
"preview": "package com.kunal;\n\npublic class CountNums {\n public static void main(String[] args) {\n int n = 45535;\n\n "
},
{
"path": "lectures/06-conditions-loops/code/src/com/kunal/Fibo.java",
"chars": 420,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class Fibo {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/06-conditions-loops/code/src/com/kunal/Largest.java",
"chars": 720,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class Largest {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/06-conditions-loops/code/src/com/kunal/Loops.java",
"chars": 1280,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class Loops {\n public static void main(String[] args) {\n\n "
},
{
"path": "lectures/06-conditions-loops/code/src/com/kunal/Reverse.java",
"chars": 305,
"preview": "package com.kunal;\n\npublic class Reverse {\n public static void main(String[] args) {\n int num = 123456;\n\n "
},
{
"path": "lectures/06-conditions-loops/switch/.idea/.gitignore",
"chars": 47,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n"
},
{
"path": "lectures/06-conditions-loops/switch/.idea/description.html",
"chars": 97,
"preview": "<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>"
},
{
"path": "lectures/06-conditions-loops/switch/.idea/encodings.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\">\n <file url=\"PROJECT\" chars"
},
{
"path": "lectures/06-conditions-loops/switch/.idea/misc.xml",
"chars": 499,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"EntryPointsManager\">\n <entry_points v"
},
{
"path": "lectures/06-conditions-loops/switch/.idea/modules.xml",
"chars": 252,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "lectures/06-conditions-loops/switch/.idea/project-template.xml",
"chars": 89,
"preview": "<template>\n <input-field default=\"com.company\">IJ_BASE_PACKAGE</input-field>\n</template>"
},
{
"path": "lectures/06-conditions-loops/switch/.idea/vcs.xml",
"chars": 189,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "lectures/06-conditions-loops/switch/src/com/kunal/Main.java",
"chars": 1542,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n "
},
{
"path": "lectures/06-conditions-loops/switch/src/com/kunal/NestedSwitch.java",
"chars": 1690,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class NestedSwitch {\n public static void main(String[] args) {\n"
},
{
"path": "lectures/06-conditions-loops/switch/switch.iml",
"chars": 423,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "lectures/07-methods/code/.idea/.gitignore",
"chars": 47,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n"
},
{
"path": "lectures/07-methods/code/.idea/description.html",
"chars": 97,
"preview": "<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>"
},
{
"path": "lectures/07-methods/code/.idea/encodings.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\">\n <file url=\"PROJECT\" chars"
},
{
"path": "lectures/07-methods/code/.idea/misc.xml",
"chars": 499,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"EntryPointsManager\">\n <entry_points v"
},
{
"path": "lectures/07-methods/code/.idea/modules.xml",
"chars": 248,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "lectures/07-methods/code/.idea/project-template.xml",
"chars": 89,
"preview": "<template>\n <input-field default=\"com.company\">IJ_BASE_PACKAGE</input-field>\n</template>"
},
{
"path": "lectures/07-methods/code/.idea/vcs.xml",
"chars": 189,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "lectures/07-methods/code/code.iml",
"chars": 423,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "lectures/07-methods/code/src/com/kunal/ChangeValue.java",
"chars": 416,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\n\npublic class ChangeValue{\n public static void main(String[] args) {\n "
},
{
"path": "lectures/07-methods/code/src/com/kunal/Greeting.java",
"chars": 195,
"preview": "package com.kunal;\n\npublic class Greeting {\n public static void main(String[] args) {\n greeting();\n }\n s"
},
{
"path": "lectures/07-methods/code/src/com/kunal/Main.java",
"chars": 2740,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n "
},
{
"path": "lectures/07-methods/code/src/com/kunal/Overloading.java",
"chars": 583,
"preview": "package com.kunal;\n\npublic class Overloading {\n public static void main(String[] args) {\n// fun(67);\n// "
},
{
"path": "lectures/07-methods/code/src/com/kunal/PassingExample.java",
"chars": 240,
"preview": "package com.kunal;\n\npublic class PassingExample {\n public static void main(String[] args) {\n String chacha = \""
},
{
"path": "lectures/07-methods/code/src/com/kunal/Questions.java",
"chars": 995,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class Questions {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/07-methods/code/src/com/kunal/Scope.java",
"chars": 1079,
"preview": "package com.kunal;\n\npublic class Scope {\n public static void main(String[] args) {\n int a = 10;\n int b "
},
{
"path": "lectures/07-methods/code/src/com/kunal/Shadowing.java",
"chars": 469,
"preview": "package com.kunal;\n\npublic class Shadowing {\n static int x = 90; // this will be shadowed at line 8\n public static"
},
{
"path": "lectures/07-methods/code/src/com/kunal/StringExample.java",
"chars": 635,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class StringExample {\n\n public static void main(String[] args) "
},
{
"path": "lectures/07-methods/code/src/com/kunal/Sum.java",
"chars": 1206,
"preview": "package com.kunal;\n\nimport java.util.Scanner;\n\npublic class Sum {\n public static void main(String[] args) {\n// "
},
{
"path": "lectures/07-methods/code/src/com/kunal/Swap.java",
"chars": 679,
"preview": "package com.kunal;\n\npublic class Swap {\n public static void main(String[] args) {\n int a = 10;\n int b ="
},
{
"path": "lectures/07-methods/code/src/com/kunal/VarArgs.java",
"chars": 543,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\n\npublic class VarArgs {\n public static void main(String[] args) {\n// "
},
{
"path": "lectures/08-arrays/code/.idea/.gitignore",
"chars": 47,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n"
},
{
"path": "lectures/08-arrays/code/.idea/description.html",
"chars": 97,
"preview": "<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>"
},
{
"path": "lectures/08-arrays/code/.idea/encodings.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\">\n <file url=\"PROJECT\" chars"
},
{
"path": "lectures/08-arrays/code/.idea/misc.xml",
"chars": 499,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"EntryPointsManager\">\n <entry_points v"
},
{
"path": "lectures/08-arrays/code/.idea/modules.xml",
"chars": 248,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "lectures/08-arrays/code/.idea/project-template.xml",
"chars": 89,
"preview": "<template>\n <input-field default=\"com.company\">IJ_BASE_PACKAGE</input-field>\n</template>"
},
{
"path": "lectures/08-arrays/code/.idea/vcs.xml",
"chars": 189,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "lectures/08-arrays/code/code.iml",
"chars": 423,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "lectures/08-arrays/code/src/com/kunal/ArrayListExample.java",
"chars": 937,
"preview": "package com.kunal;\n\nimport java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class ArrayListExample {\n public st"
},
{
"path": "lectures/08-arrays/code/src/com/kunal/ColNoFixed.java",
"chars": 443,
"preview": "package com.kunal;\n\npublic class ColNoFixed {\n public static void main(String[] args) {\n int[][] arr = {\n "
},
{
"path": "lectures/08-arrays/code/src/com/kunal/Input.java",
"chars": 1270,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Input {\n public static void main"
},
{
"path": "lectures/08-arrays/code/src/com/kunal/Main.java",
"chars": 941,
"preview": "package com.kunal;\n\npublic class Main {\n\n public static void main(String[] args) {\n // Q: store a roll number\n"
},
{
"path": "lectures/08-arrays/code/src/com/kunal/Max.java",
"chars": 907,
"preview": "package com.kunal;\n\npublic class Max {\n public static void main(String[] args) {\n int[] arr = {1, 3, 2, 9, 18}"
},
{
"path": "lectures/08-arrays/code/src/com/kunal/MultiAL.java",
"chars": 587,
"preview": "package com.kunal;\n\nimport java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class MultiAL {\n public static void"
},
{
"path": "lectures/08-arrays/code/src/com/kunal/MultiDimension.java",
"chars": 1384,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\nimport java.util.Scanner;\n\npublic class MultiDimension {\n public static "
},
{
"path": "lectures/08-arrays/code/src/com/kunal/PassinginFunctions.java",
"chars": 356,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\n\npublic class PassinginFunctions {\n public static void main(String[] arg"
},
{
"path": "lectures/08-arrays/code/src/com/kunal/Swap.java",
"chars": 655,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\n\npublic class Swap {\n public static void main(String[] args) {\n i"
},
{
"path": "lectures/09-linear search/code/.idea/.gitignore",
"chars": 47,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n"
},
{
"path": "lectures/09-linear search/code/.idea/description.html",
"chars": 97,
"preview": "<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>"
},
{
"path": "lectures/09-linear search/code/.idea/encodings.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\">\n <file url=\"PROJECT\" chars"
},
{
"path": "lectures/09-linear search/code/.idea/misc.xml",
"chars": 499,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"EntryPointsManager\">\n <entry_points v"
},
{
"path": "lectures/09-linear search/code/.idea/modules.xml",
"chars": 248,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "lectures/09-linear search/code/.idea/project-template.xml",
"chars": 89,
"preview": "<template>\n <input-field default=\"com.company\">IJ_BASE_PACKAGE</input-field>\n</template>"
},
{
"path": "lectures/09-linear search/code/.idea/vcs.xml",
"chars": 189,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "lectures/09-linear search/code/code.iml",
"chars": 423,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "lectures/09-linear search/code/src/com/kunal/EvenDigits.java",
"chars": 1314,
"preview": "package com.kunal;\n// https://leetcode.com/problems/find-numbers-with-even-number-of-digits/\npublic class EvenDigits {\n "
},
{
"path": "lectures/09-linear search/code/src/com/kunal/FindMin.java",
"chars": 473,
"preview": "package com.kunal;\n\npublic class FindMin {\n public static void main(String[] args) {\n int[] arr = {18, 12, 7, "
},
{
"path": "lectures/09-linear search/code/src/com/kunal/Main.java",
"chars": 1875,
"preview": "package com.kunal;\n\npublic class Main {\n\n public static void main(String[] args) {\n\t int[] nums = {23, 45, 1, 2, 8"
},
{
"path": "lectures/09-linear search/code/src/com/kunal/MaxWealth.java",
"chars": 701,
"preview": "package com.kunal;\n// https://leetcode.com/problems/richest-customer-wealth/\npublic class MaxWealth {\n public static "
},
{
"path": "lectures/09-linear search/code/src/com/kunal/SearchIn2DArray.java",
"chars": 1151,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\n\npublic class SearchIn2DArray {\n public static void main(String[] args) "
},
{
"path": "lectures/09-linear search/code/src/com/kunal/SearchInRange.java",
"chars": 802,
"preview": "package com.kunal;\n\npublic class SearchInRange {\n public static void main(String[] args) {\n int[] arr = {18, 1"
},
{
"path": "lectures/09-linear search/code/src/com/kunal/SearchInStrings.java",
"chars": 885,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\n\npublic class SearchInStrings {\n public static void main(String[] args) "
},
{
"path": "lectures/10-binary search/code/.idea/.gitignore",
"chars": 47,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n"
},
{
"path": "lectures/10-binary search/code/.idea/description.html",
"chars": 97,
"preview": "<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>"
},
{
"path": "lectures/10-binary search/code/.idea/encodings.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\">\n <file url=\"PROJECT\" chars"
},
{
"path": "lectures/10-binary search/code/.idea/misc.xml",
"chars": 499,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"EntryPointsManager\">\n <entry_points v"
},
{
"path": "lectures/10-binary search/code/.idea/modules.xml",
"chars": 248,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "lectures/10-binary search/code/.idea/project-template.xml",
"chars": 89,
"preview": "<template>\n <input-field default=\"com.company\">IJ_BASE_PACKAGE</input-field>\n</template>"
},
{
"path": "lectures/10-binary search/code/.idea/uiDesigner.xml",
"chars": 8792,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Palette2\">\n <group name=\"Swing\">\n "
},
{
"path": "lectures/10-binary search/code/.idea/vcs.xml",
"chars": 189,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "lectures/10-binary search/code/code.iml",
"chars": 423,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "lectures/10-binary search/code/src/com/kunal/BinarySearch.java",
"chars": 958,
"preview": "package com.kunal;\n\npublic class BinarySearch {\n\n public static void main(String[] args) {\n int[] arr = {-18, "
},
{
"path": "lectures/10-binary search/code/src/com/kunal/Ceiling.java",
"chars": 1068,
"preview": "package com.kunal;\n\npublic class Ceiling {\n\n public static void main(String[] args) {\n int[] arr = {2, 3, 5, 9"
},
{
"path": "lectures/10-binary search/code/src/com/kunal/FirstAndLastPosition.java",
"chars": 1288,
"preview": "package com.kunal;\n\npublic class FirstAndLastPosition {\n public static void main(String[] args) {\n\n }\n\n public "
},
{
"path": "lectures/10-binary search/code/src/com/kunal/Floor.java",
"chars": 900,
"preview": "package com.kunal;\n\npublic class Floor {\n\n public static void main(String[] args) {\n int[] arr = {2, 3, 5, 9, "
},
{
"path": "lectures/10-binary search/code/src/com/kunal/InfiniteArray.java",
"chars": 1462,
"preview": "package com.kunal;\n// https://www.geeksforgeeks.org/find-position-element-sorted-array-infinite-numbers/\npublic class In"
},
{
"path": "lectures/10-binary search/code/src/com/kunal/Mountain.java",
"chars": 1413,
"preview": "package com.kunal;\n\npublic class Mountain {\n public static void main(String[] args) {\n\n }\n // https://leetcode."
},
{
"path": "lectures/10-binary search/code/src/com/kunal/OrderAgnosticBS.java",
"chars": 1297,
"preview": "package com.kunal;\n\npublic class OrderAgnosticBS {\n public static void main(String[] args) {\n// int[] arr = {-"
},
{
"path": "lectures/10-binary search/code/src/com/kunal/RBS.java",
"chars": 3488,
"preview": "package com.kunal;\n// https://leetcode.com/problems/search-in-rotated-sorted-array/submissions/\npublic class RBS {\n p"
},
{
"path": "lectures/10-binary search/code/src/com/kunal/RotationCount.java",
"chars": 2323,
"preview": "package com.kunal;\n\npublic class RotationCount {\n public static void main(String[] args) {\n int[] arr = {4,5,6"
},
{
"path": "lectures/10-binary search/code/src/com/kunal/RowColMatrix.java",
"chars": 783,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\n\npublic class RowColMatrix {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/10-binary search/code/src/com/kunal/SearchInMountain.java",
"chars": 2613,
"preview": "package com.kunal;\n\npublic class SearchInMountain {\n public static void main(String[] args) {\n\n }\n // https://l"
},
{
"path": "lectures/10-binary search/code/src/com/kunal/SmallestLetter.java",
"chars": 748,
"preview": "package com.kunal;\n// https://leetcode.com/problems/find-smallest-letter-greater-than-target/\npublic class SmallestLette"
},
{
"path": "lectures/10-binary search/code/src/com/kunal/SortedMatrix.java",
"chars": 2637,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\n\npublic class SortedMatrix {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/10-binary search/code/src/com/kunal/SplitArray.java",
"chars": 1301,
"preview": "package com.kunal;\n// https://leetcode.com/problems/split-array-largest-sum/\npublic class SplitArray {\n public static"
},
{
"path": "lectures/11-sorting/code/.idea/.gitignore",
"chars": 47,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n"
},
{
"path": "lectures/11-sorting/code/.idea/description.html",
"chars": 97,
"preview": "<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>"
},
{
"path": "lectures/11-sorting/code/.idea/encodings.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\">\n <file url=\"PROJECT\" chars"
},
{
"path": "lectures/11-sorting/code/.idea/misc.xml",
"chars": 499,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"EntryPointsManager\">\n <entry_points v"
},
{
"path": "lectures/11-sorting/code/.idea/modules.xml",
"chars": 248,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "lectures/11-sorting/code/.idea/project-template.xml",
"chars": 89,
"preview": "<template>\n <input-field default=\"com.company\">IJ_BASE_PACKAGE</input-field>\n</template>"
},
{
"path": "lectures/11-sorting/code/.idea/uiDesigner.xml",
"chars": 8792,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Palette2\">\n <group name=\"Swing\">\n "
},
{
"path": "lectures/11-sorting/code/.idea/vcs.xml",
"chars": 189,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "lectures/11-sorting/code/code.iml",
"chars": 423,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "lectures/11-sorting/code/src/com/kunal/CyclicSort.java",
"chars": 669,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\n\npublic class CyclicSort {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/11-sorting/code/src/com/kunal/FindAllDuplicates.java",
"chars": 856,
"preview": "package com.kunal;\n\nimport java.util.ArrayList;\nimport java.util.List;\n// https://leetcode.com/problems/find-all-duplica"
},
{
"path": "lectures/11-sorting/code/src/com/kunal/FindAllMissing.java",
"chars": 926,
"preview": "package com.kunal;\n\nimport java.util.ArrayList;\nimport java.util.List;\n// https://leetcode.com/problems/find-all-numbers"
},
{
"path": "lectures/11-sorting/code/src/com/kunal/FindDuplicate.java",
"chars": 698,
"preview": "package com.kunal;\n// https://leetcode.com/problems/find-the-duplicate-number/\npublic class FindDuplicate {\n public i"
},
{
"path": "lectures/11-sorting/code/src/com/kunal/Main.java",
"chars": 2111,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\n\npublic class Main {\n\n public static void main(String[] args) {\n "
},
{
"path": "lectures/11-sorting/code/src/com/kunal/MissingNumber.java",
"chars": 956,
"preview": "package com.kunal;\n// https://leetcode.com/problems/missing-number/\n// Amazon Question\nclass MissingNumber {\n\n public"
},
{
"path": "lectures/11-sorting/code/src/com/kunal/MissingPositive.java",
"chars": 859,
"preview": "package com.kunal;\n// https://leetcode.com/problems/first-missing-positive/\npublic class MissingPositive {\n\n public s"
},
{
"path": "lectures/11-sorting/code/src/com/kunal/SetMismatch.java",
"chars": 801,
"preview": "package com.kunal;\n// https://leetcode.com/problems/set-mismatch/\npublic class SetMismatch {\n public int[] findErrorN"
},
{
"path": "lectures/12-strings/code/.idea/.gitignore",
"chars": 47,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n"
},
{
"path": "lectures/12-strings/code/.idea/description.html",
"chars": 97,
"preview": "<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>"
},
{
"path": "lectures/12-strings/code/.idea/encodings.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\">\n <file url=\"PROJECT\" chars"
},
{
"path": "lectures/12-strings/code/.idea/misc.xml",
"chars": 499,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"EntryPointsManager\">\n <entry_points v"
},
{
"path": "lectures/12-strings/code/.idea/modules.xml",
"chars": 248,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "lectures/12-strings/code/.idea/project-template.xml",
"chars": 89,
"preview": "<template>\n <input-field default=\"com.company\">IJ_BASE_PACKAGE</input-field>\n</template>"
},
{
"path": "lectures/12-strings/code/.idea/vcs.xml",
"chars": 189,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "lectures/12-strings/code/code.iml",
"chars": 423,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "lectures/12-strings/code/src/com/kunal/Comparison.java",
"chars": 452,
"preview": "package com.kunal;\n\npublic class Comparison {\n public static void main(String[] args) {\n String a = \"Kunal\";\n "
},
{
"path": "lectures/12-strings/code/src/com/kunal/Main.java",
"chars": 345,
"preview": "package com.kunal;\n\npublic class Main {\n\n public static void main(String[] args) {\n int[] arr = {2, 3, 5, 4, 1"
},
{
"path": "lectures/12-strings/code/src/com/kunal/Methods.java",
"chars": 483,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\n\npublic class Methods {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/12-strings/code/src/com/kunal/Operators.java",
"chars": 667,
"preview": "package com.kunal;\n\nimport java.util.ArrayList;\n\npublic class Operators {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/12-strings/code/src/com/kunal/Output.java",
"chars": 455,
"preview": "package com.kunal;\n\nimport java.util.Arrays;\n\npublic class Output {\n public static void main(String[] args) {\n "
},
{
"path": "lectures/12-strings/code/src/com/kunal/Palin.java",
"chars": 599,
"preview": "package com.kunal;\n\npublic class Palin {\n public static void main(String[] args) {\n String str = \"abcba\";\n "
},
{
"path": "lectures/12-strings/code/src/com/kunal/Performance.java",
"chars": 303,
"preview": "package com.kunal;\n\npublic class Performance {\n public static void main(String[] args) {\n String series = \"\";\n"
},
{
"path": "lectures/12-strings/code/src/com/kunal/PrettyPrinting.java",
"chars": 324,
"preview": "package com.kunal;\n\npublic class PrettyPrinting {\n public static void main(String[] args) {\n float a = 453.127"
},
{
"path": "lectures/12-strings/code/src/com/kunal/SB.java",
"chars": 379,
"preview": "package com.kunal;\n\npublic class SB {\n public static void main(String[] args) {\n StringBuilder builder = new S"
},
{
"path": "lectures/12-strings/code/src/com/kunal/placeholders_list.txt",
"chars": 346,
"preview": "There are many format specifiers we can use. Here are some common ones:\n\n%c - Character\n%d - Decimal number (base 10)\n%e"
},
{
"path": "lectures/13-patterns/code/.idea/.gitignore",
"chars": 47,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n"
},
{
"path": "lectures/13-patterns/code/.idea/description.html",
"chars": 97,
"preview": "<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>"
},
{
"path": "lectures/13-patterns/code/.idea/encodings.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\">\n <file url=\"PROJECT\" chars"
},
{
"path": "lectures/13-patterns/code/.idea/misc.xml",
"chars": 499,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"EntryPointsManager\">\n <entry_points v"
},
{
"path": "lectures/13-patterns/code/.idea/modules.xml",
"chars": 248,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "lectures/13-patterns/code/.idea/project-template.xml",
"chars": 89,
"preview": "<template>\n <input-field default=\"com.company\">IJ_BASE_PACKAGE</input-field>\n</template>"
},
{
"path": "lectures/13-patterns/code/.idea/vcs.xml",
"chars": 189,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "lectures/13-patterns/code/code.iml",
"chars": 423,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "lectures/13-patterns/code/src/com/kunal/Main.java",
"chars": 3642,
"preview": "package com.kunal;\n\npublic class Main {\n public static void main(String[] args) {\n pattern31(4);\n }\n\n st"
},
{
"path": "lectures/14-recursion/code/.idea/.gitignore",
"chars": 47,
"preview": "# Default ignored files\n/shelf/\n/workspace.xml\n"
},
{
"path": "lectures/14-recursion/code/.idea/description.html",
"chars": 97,
"preview": "<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>"
},
{
"path": "lectures/14-recursion/code/.idea/encodings.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\">\n <file url=\"PROJECT\" chars"
},
{
"path": "lectures/14-recursion/code/.idea/misc.xml",
"chars": 499,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"EntryPointsManager\">\n <entry_points v"
},
{
"path": "lectures/14-recursion/code/.idea/modules.xml",
"chars": 248,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "lectures/14-recursion/code/.idea/project-template.xml",
"chars": 89,
"preview": "<template>\n <input-field default=\"com.company\">IJ_BASE_PACKAGE</input-field>\n</template>"
},
{
"path": "lectures/14-recursion/code/.idea/uiDesigner.xml",
"chars": 8792,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Palette2\">\n <group name=\"Swing\">\n "
},
{
"path": "lectures/14-recursion/code/.idea/vcs.xml",
"chars": 189,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "lectures/14-recursion/code/code.iml",
"chars": 423,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n <component name=\"NewModuleRootManager\" "
},
{
"path": "lectures/14-recursion/code/src/com/kunal/arrays/Find.java",
"chars": 2553,
"preview": "package com.kunal.arrays;\n\nimport java.util.ArrayList;\n\npublic class Find {\n public static void main(String[] args) {"
},
{
"path": "lectures/14-recursion/code/src/com/kunal/arrays/RBS.java",
"chars": 821,
"preview": "package com.kunal.arrays;\n\npublic class RBS {\n public static void main(String[] args) {\n int[] arr = {5, 6, 7,"
},
{
"path": "lectures/14-recursion/code/src/com/kunal/arrays/Sorted.java",
"chars": 415,
"preview": "package com.kunal.arrays;\n\npublic class Sorted {\n public static void main(String[] args) {\n int[] arr = {1, 2,"
}
]
// ... and 253 more files (download for full content)
About this extraction
This page contains the full source code of the kunal-kushwaha/DSA-Bootcamp-Java GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 453 files (484.8 KB), approximately 143.7k tokens, and a symbol index with 1066 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.