Skip to content

ankit6686510/java-Dsa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Data Structures and Algorithms

This repository contains my implementation of various data structures and algorithms in Java, organized by topics and concepts.

Table of Contents

Introduction

This repository serves as a collection of Java implementations for fundamental data structures and algorithms. The code is organized into different packages based on topics, making it easy to navigate and understand.

Topics Covered

Basic Java Programming

  • Variables and data types (BasicsIntro/)
  • Operators and expressions
  • Input/output handling
  • Control flow (if-else, switch statements)

Loops and Patterns

  • For loops, while loops (Loops/)
  • Various pattern printing techniques (Pattern/)
  • Armstrong numbers, Palindrome checking
  • Number series (Fibonacci, etc.)

Arrays

  • Array manipulation (lecture_11_Arrays/)
  • Linear search
  • Finding max/min elements
  • Reversing arrays

Sorting Algorithms

  • Selection sort (sorting/)
  • Insertion sort
  • Cyclic sort and its applications

Binary Search

  • Binary search implementation (Lecture_20_binary search/)
  • Search in mountain array
  • Book allocation problem
  • Aggressive cows problem

Strings

  • String manipulation (Lecture_22_Strings/)
  • Palindrome detection
  • Substring operations

ArrayList and Wrapper Classes

  • ArrayList usage (Lecture_24_ArrayList_Wrapper/)
  • ArrayList traversal
  • ArrayList working(for each loop )
  • Auto-boxing, unboxing
  • Wrapper class implementations

Trees

  • Binary trees (Trees/)
  • Binary search trees
  • Tree traversals (in-order, pre-order, post-order)
  • AVL trees
  • Segment trees

Menu-Driven Programs

  • Various practical applications (SwitchStament/)
  • Library management system
  • Parking management system
  • Grading system

Folder Structure

  • BasicsIntro/: Basic Java concepts like data types, operators, etc.
  • Lecture4/, Lecture_6/: Fundamental programming concepts
  • Loops/: Different types of loop implementations and problems
  • Pattern/: Pattern printing problems with different designs
  • lecture_11_Arrays/: Array manipulation and algorithms
  • sorting/: Various sorting algorithms and their implementations
  • Lecture_20_binary search/: Binary search and its applications
  • Lecture_22_Strings/: String manipulation and algorithms
  • Lecture_23/: Additional string operations
  • Lecture_24_ArrayList_Wrapper/: ArrayList and wrapper classes
  • SwitchStament/: Menu-driven programs using switch statements
  • Trees/: Implementation of various tree data structures

Key Problems by Folder

Loops/

  • Fibonacci series
  • Armstrong numbers
  • Palindrome checking
  • Factorial calculation
  • Prime number generation
  • Summing digits of a number
  • Reversing numbers

Pattern/

  • Triangle patterns
  • Diamond patterns
  • Hourglass patterns
  • Mirror patterns
  • Number patterns

lecture_11_Arrays/

  • Linear search
  • Finding second largest element
  • Armstrong number with arrays
  • Swapping elements
  • Reverse array operations

sorting/

  • Selection sort
  • Insertion sort
  • Cyclic sort
  • Rainwater trapping problem
  • Finding missing/duplicate numbers -other problems

Lecture_20_binary search/

  • Mountain array problem
  • Book allocation problem
  • Aggressive cows problem
  • Kth largest fraction

Trees/

  • Binary tree implementation
  • Binary search tree operations
  • AVL tree balancing
  • Tree traversal methods
  • Segment tree for range queries

SwitchStament/

  • Menu-driven programs
  • Day of week finder
  • Basic calculator
  • Fruit price checker
  • Grade system
  • Library management system
  • Parking management system

Getting Started

To run these programs:

  1. Make sure you have Java Development Kit (JDK) installed
  2. Clone this repository
  3. Navigate to specific folders to find implementations
  4. Compile and run individual Java files:
    javac filename.java
    java ClassName
    

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

Data structure and Algo in detail

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages