Topics Covered:
- Taking input from the user
- Displaying output
- Conditional statements (
if,else,else if)
Topics Covered:
- Loops:
for,while, anddo-while - Prime number checking
- Prime numbers printing till the given number
π§ 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
π§ 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
π§ 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
π§ Topic: Prime Factorization
π₯ Input: A positive integer (entered by the user)
π€ Output: All prime factors of the given number
π§ 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
π§ Topic: Mathematical Patterns β Perfect Squares
π₯ Input: Total number of bulbs (entered by the user)
π€ Output: List of bulbs that will remain ON
π§ Topic: Star Pattern Printing using Nested Loops
π₯ Input: Number of rows (entered by the user)
π€ Output: Two different star patterns displayed using loops
π§ Topic: Inverted Triangle Star Patterns
π₯ Input: Number of rows (entered by the user)
π€ Output: Two different inverted triangle patterns made using *
π§ Topic: Symmetric Pyramid Pattern Printing
π₯ Input: Number of rows (entered by the user)
π€ Output: Upright and inverted centered pyramid star patterns
π§ 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)
π§ Topic: Symmetric Pattern β Butterfly Shape
π₯ Input: Number of rows (entered by the user)
π€ Output: A butterfly-shaped star pattern using * and spaces
π§ Topic: Diagonal Pattern Printing
π₯ Input: Number of rows (entered by the user)
π€ Output: A right-slanted diagonal line made using *
π§ Topic: Reverse Diagonal Pattern Printing
π₯ Input: Number of rows (entered by the user)
π€ Output: A left-slanted diagonal line made using *
π§ Topic: Functions & Recursion/Iteration
π₯ Input: A positive integer (entered by the user)
π€ Output: Factorial of the given number
π§ 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
π§ 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
π§ Topic: Array Analysis β Finding Span
π₯ Input: An array of integers (entered by the user or predefined)
π€ Output: The span of the 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"
π§ 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
π§ Topic: Subtracting Numbers Represented as Arrays
π₯ Input:
- Two arrays of digits:
array1andarray2
(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
π§ Topic: Stack β Expression Validation
π₯ Input: A string expression containing brackets (e.g., (a + (b) + ((c + d))))
π€ Output: true if duplicate brackets exist, otherwise false
π§ 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
π§ 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)
π§ Topic: Array Traversal & Conditional Logic
π₯ Input: An array of integers (unsorted, user input)
π€ Output: The second greatest (second largest) number in the array
π§ 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
π§ 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
π§ 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
π§ 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
π§ Topic: Stack | Expression Evaluation
π₯ Input: A postfix expression string (e.g., "231*+9-")
π€ Output: Evaluated integer result