Skip to content

A comprehensive collection of programming solutions, algorithms, and patterns for junior developer roles, organized by topic and programming language.

License

Notifications You must be signed in to change notification settings

saksham-shekher/Practice-Questions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Practice-Questions

A comprehensive collection of programming solutions, algorithms, and patterns for junior developer roles, organized by topic and programming language.

📁 Repository Structure

This repository is organized into the following sections:

Programming Language Folders

  • Python/ - Python solutions for basic programming problems
  • Java/ - Java solutions for basic programming problems
  • C/ - C solutions for basic programming problems

Topic-Based Folders

  • Patterns/ - Pattern printing programs (12+ patterns)
  • Algorithms/ - Searching and sorting algorithms

Each folder contains solutions with multiple implementation methods to help you understand different approaches to solving the same problem.

🎯 Available Practice Questions

Basic Programming Problems (Python/, Java/, C/)

1. Palindrome Checker

A comprehensive palindrome checking solution with multiple implementation methods:

  • String Reversal Method - Reverse the string and compare
  • Two Pointer Method - Efficient O(1) space complexity approach
  • Recursive Method - Understanding recursion
  • Additional Methods - Language-specific implementations

2. Number Swapping

Multiple techniques to swap two variables:

  • Temporary variable method
  • Arithmetic operations (without temp)
  • XOR operation
  • Multiplication/division method
  • Language-specific methods

3. Fibonacci Sequence

Generate Fibonacci numbers using various approaches:

  • Iterative method
  • Recursive method
  • Memoization (dynamic programming)
  • Space-optimized iterative
  • Mathematical formula (Binet's)

4. Factorial Calculation

Calculate factorial with different implementations:

  • Iterative approach
  • Recursive approach
  • Tail recursion
  • Built-in functions
  • Loop variations

5. Odd/Even Checker

Determine if a number is odd or even:

  • Modulo operator
  • Bitwise AND operation
  • Division method
  • String manipulation

6. Prime Number Checker

Check primality and generate primes:

  • Basic approach
  • Optimized (up to √n)
  • Sieve of Eratosthenes
  • First n primes generator

7. Common Problems

Additional fundamental problems:

  • Array reversal
  • String reversal
  • Sum of digits
  • Find maximum/minimum
  • Array sum

Pattern Printing (Patterns/)

12+ common patterns including:

  • Square patterns (solid and hollow)
  • Triangles (right-angled, inverted)
  • Pyramids and diamonds
  • Number patterns
  • Floyd's triangle
  • Pascal's triangle
  • Alphabet patterns

Algorithms (Algorithms/)

Searching Algorithms

  • Linear Search - O(n)
  • Binary Search - O(log n) - Iterative & Recursive
  • Jump Search - O(√n)
  • Interpolation Search - O(log log n)

Sorting Algorithms

  • Bubble Sort - O(n²)
  • Selection Sort - O(n²)
  • Insertion Sort - O(n²)
  • Merge Sort - O(n log n)
  • Quick Sort - O(n log n) average
  • Heap Sort - O(n log n)
  • Counting Sort - O(n + k)

Quick Start:

Python:

cd Python
python palindrome.py

Java:

cd Java
javac Palindrome.java
java Palindrome

C:

cd C
gcc palindrome.c -o palindrome
./palindrome

📚 Learning Objectives

Each solution is designed to help junior developers understand:

  • Multiple approaches to solve the same problem
  • Time and space complexity analysis
  • Best practices in different programming languages
  • Code organization and documentation

🤝 Contributing

We welcome contributions! Whether you want to add new problems, implement solutions in other languages, fix bugs, or improve documentation - all contributions are appreciated.

Please read our Contributing Guidelines to get started. It includes:

  • How to contribute code
  • Style guides for Python, Java, and C
  • Pull request process
  • Issue reporting guidelines

Feel free to add more practice questions and solutions to help the community!

📚 Learning Resources

New to programming? Check out our Learning Resources Guide for:

  • Recommended tutorials and courses
  • Books for beginners
  • Practice platforms
  • Study plans and tips
  • Community resources
  • Free certifications

Perfect for beginners who want structured guidance on where to start and how to progress!

📖 How to Use

  1. Choose your preferred programming language folder
  2. Read the README in each folder for specific instructions
  3. Study the different implementation methods
  4. Run the code to see the results
  5. Try modifying the test cases to experiment

Happy coding! 🚀

About

A comprehensive collection of programming solutions, algorithms, and patterns for junior developer roles, organized by topic and programming language.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •