Skip to content

AbhayGarg123/DSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

70 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’» DSA Journey (Day-by-Day Progress)

πŸ“… Day 1: Input & Output + Conditional Statements

Topics Covered:

  • Taking input from the user
  • Displaying output
  • Conditional statements (if, else, else if)

πŸ“… Day 2: Loops + Prime Number Logic

Topics Covered:

  • Loops: for, while, and do-while
  • Prime number checking
  • Prime numbers printing till the given number

πŸ“… Day 3: Fibonacci Series

🧠 Topic: Fibonacci Series Generation
πŸ“₯ Input: Number of terms to print (provided by the user)
πŸ“€ Output: A sequence of Fibonacci numbers up to the given number of terms

πŸ“… Day 4: Digit Count & Reverse of a Number

🧠 Topic: Number Digit Count and Reversal
πŸ“₯ Input: A positive integer (entered by the user)
πŸ“€ Output:

  • Total number of digits in the number
  • Reverse of the number

πŸ“… Day 5: GCD and LCM of Two Numbers

🧠 Topic: Greatest Common Divisor (GCD) & Least Common Multiple (LCM)
πŸ“₯ Input: Two positive integers (entered by the user)
πŸ“€ Output:

  • GCD of the two numbers
  • LCM of the two numbers

πŸ“… Day 6: Prime Factorization of a Number

🧠 Topic: Prime Factorization
πŸ“₯ Input: A positive integer (entered by the user)
πŸ“€ Output: All prime factors of the given number

πŸ“… Day 7: Right-Angled Triangle Check & Area Calculation

🧠 Topic: Triangle Properties – Right-Angled Check & Area
πŸ“₯ Input: Three sides of a triangle (entered by the user)
πŸ“€ Output:

  • Whether the triangle is a right-angled triangle or not
  • The area of the triangle

πŸ“… Day 8: Benjamin Bulb Problem

🧠 Topic: Mathematical Patterns – Perfect Squares
πŸ“₯ Input: Total number of bulbs (entered by the user)
πŸ“€ Output: List of bulbs that will remain ON

πŸ“… Day 9: Star Patterns – Pattern 1 & Pattern 2

🧠 Topic: Star Pattern Printing using Nested Loops
πŸ“₯ Input: Number of rows (entered by the user)
πŸ“€ Output: Two different star patterns displayed using loops

⭐ Pattern 1: Left-Aligned Right-Angled Triangle

⭐ Pattern 2: Right-Aligned Right-Angled Triangle

πŸ“… Day 10: Inverted Star Patterns – Pattern 1 & Pattern 2

🧠 Topic: Inverted Triangle Star Patterns
πŸ“₯ Input: Number of rows (entered by the user)
πŸ“€ Output: Two different inverted triangle patterns made using *

⭐ Pattern 1: Right-Aligned Inverted Triangle

⭐ Pattern 2: Left-Aligned Inverted Triangle

πŸ“… Day 11: Centered Pyramid Patterns – Pattern 1 & Pattern 2

🧠 Topic: Symmetric Pyramid Pattern Printing
πŸ“₯ Input: Number of rows (entered by the user)
πŸ“€ Output: Upright and inverted centered pyramid star patterns

⭐ Pattern 1: Centered Pyramid

⭐ Pattern 2: Inverted Centered Pyramid

πŸ“… Day 12: Diamond Star Pattern (Symmetric Hourglass)

🧠 Topic: Complex Star Pattern – Full Symmetric Diamond
πŸ“₯ Input: Number of rows (typically half the height; entered by the user)
πŸ“€ Output: A diamond-shaped star pattern (pyramid + inverted pyramid)

πŸ“… Day 13: Butterfly Star Pattern

🧠 Topic: Symmetric Pattern – Butterfly Shape
πŸ“₯ Input: Number of rows (entered by the user)
πŸ“€ Output: A butterfly-shaped star pattern using * and spaces

πŸ“… Day 14: Right-Diagonal Star Pattern

🧠 Topic: Diagonal Pattern Printing
πŸ“₯ Input: Number of rows (entered by the user)
πŸ“€ Output: A right-slanted diagonal line made using *

⭐ Pattern: Right-Diagonal Line

πŸ“… Day 15: Left-Diagonal Star Pattern

🧠 Topic: Reverse Diagonal Pattern Printing
πŸ“₯ Input: Number of rows (entered by the user)
πŸ“€ Output: A left-slanted diagonal line made using *

⭐ Pattern: Left-Diagonal Line

πŸ“… Day 16: Factorial of a Number using Function

🧠 Topic: Functions & Recursion/Iteration
πŸ“₯ Input: A positive integer (entered by the user)
πŸ“€ Output: Factorial of the given number

πŸ“… Day 17: Frequency of a Digit in a Number using Function

🧠 Topic: Digit Frequency Analysis with Functions
πŸ“₯ Input:

  • A number (e.g., 7555325)
  • A digit whose frequency needs to be found (e.g., 5)
    πŸ“€ Output: Count how many times the digit appears in the number

πŸ“… Day 18: Convert Decimal to Any Base (2 to 36)

🧠 Topic: Number System Conversion
πŸ“₯ Input:

  • A decimal number (e.g., 255)
  • A target base (between 2 and 36)

πŸ“€ Output: Equivalent number in the target base

πŸ“… Day 19: Span of an Array

🧠 Topic: Array Analysis – Finding Span
πŸ“₯ Input: An array of integers (entered by the user or predefined)
πŸ“€ Output: The span of the array

πŸ“… Day 20: Search an Element in an Array

🧠 Topic: Array Traversal & Linear Search
πŸ“₯ Input:

  • An array of integers
  • A target element to search for
    πŸ“€ Output: Index of the element if found; otherwise, a message saying "Not Found"

πŸ“… Day 21: Sum of Two Arrays (Digit-wise Addition)

🧠 Topic: Array Manipulation – Adding Two Numbers Represented as Arrays
πŸ“₯ Input:

  • Two integer arrays, each representing a number (e.g., [9, 8, 7] β†’ 987)
    πŸ“€ Output: Resultant array representing the sum of the two numbers

πŸ“… Day 22: Difference of Two Arrays (Supports Negative Result)

🧠 Topic: Subtracting Numbers Represented as Arrays
πŸ“₯ Input:

  • Two arrays of digits: array1 and array2
    (Each represents a number: e.g., [1, 2, 3] β†’ 123)
    πŸ“€ Output: A new array representing the difference: array1 - array2
  • Output includes a negative sign if array1 < array2

πŸ“… Day 23: Duplicate Brackets Problem

🧠 Topic: Stack – Expression Validation
πŸ“₯ Input: A string expression containing brackets (e.g., (a + (b) + ((c + d))))
πŸ“€ Output: true if duplicate brackets exist, otherwise false

πŸ“… Day 24: Balanced Brackets Problem

🧠 Topic: Stack – Expression Validation
πŸ“₯ Input: A string expression containing brackets (e.g., (a + [b] + {c}))
πŸ“€ Output: true if brackets are balanced and properly nested, otherwise false

πŸ“… Day 25: Next Greater Element Problem

🧠 Topic: Stack – Array Processing
πŸ“₯ Input: An array of integers
πŸ“€ Output: For each element, print the next greater element to its right
(If no such element exists, output -1)

πŸ“… Day 26: Find the Second Greatest Number in an Array

🧠 Topic: Array Traversal & Conditional Logic
πŸ“₯ Input: An array of integers (unsorted, user input)
πŸ“€ Output: The second greatest (second largest) number in the array

πŸ“… Day 28: Largest Area in Histogram

🧠 Topic: Stack – Monotonic Stack Pattern
πŸ“₯ Input: An array representing the heights of bars in a histogram
πŸ“€ Output: The maximum area of the rectangle that can be formed in the histogram

πŸ“… Day 27: Stock Span Problem

🧠 Topic: Stack – Array Processing
πŸ“₯ Input: An array representing stock prices over n days
πŸ“€ Output: An array where each element represents the stock span on that day

πŸ“… Day 29: Sliding Window Maximum

🧠 Topic: Deque (Double-Ended Queue) / Sliding Window Technique
πŸ“₯ Input: An array of integers and a window size k
πŸ“€ Output: An array of maximum values for each sliding window of size k

πŸ“… Day 30: Infix Expression Evaluation

🧠 Topic: Stack | Expression Parsing
πŸ“₯ Input: A string containing a valid infix expression (e.g., "2 + 3 * (4 - 1)")
πŸ“€ Output: The evaluated integer result of the expression

πŸ“… Day 31: Postfix Expression Evaluation

🧠 Topic: Stack | Expression Evaluation
πŸ“₯ Input: A postfix expression string (e.g., "231*+9-")
πŸ“€ Output: Evaluated integer result

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages