https://github.com/hasanulmukit/programming-problems
A curated repository of programming problem solutions implemented in C, C++, Java, and Python. Organized by topic and difficulty, it provides a clear and accessible resource for developers and learners to explore algorithms, data structures, and coding challenges.
https://github.com/hasanulmukit/programming-problems
c coding-interviews coding-test cpp java programming-exercises programming-problems python
Last synced: 5 months ago
JSON representation
A curated repository of programming problem solutions implemented in C, C++, Java, and Python. Organized by topic and difficulty, it provides a clear and accessible resource for developers and learners to explore algorithms, data structures, and coding challenges.
- Host: GitHub
- URL: https://github.com/hasanulmukit/programming-problems
- Owner: hasanulmukit
- License: mit
- Created: 2025-02-17T04:57:18.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-03-29T04:32:35.000Z (7 months ago)
- Last Synced: 2025-06-02T04:06:00.875Z (5 months ago)
- Topics: c, coding-interviews, coding-test, cpp, java, programming-exercises, programming-problems, python
- Language: Java
- Homepage:
- Size: 171 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Programming Problems
Welcome to my collection of programming problems and their solutions implemented in multiple languages: **C**, **C++**, **Java**, and **Python**.
Each problem is categorized (e.g., Basic, Intermediate, Advanced, Miscellaneous). Click on a problem to see the solutions in your preferred programming language.
---
## Table of Contents
- [Basic Questions](#basic-questions)
- [Intermediate Questions](#intermediate-questions)
- [Advanced Questions](#advanced-questions)
- [Miscellaneous Questions](#miscellaneous-questions)
- [Contributing](#contributing)
- [License](#license)
---
## Basic Questions
1. **Write a program to reverse a string**
2. **Find the largest and smallest number in an array**
3. **Check if a string is a palindrome**
4. **Write a program to check if a number is prime**
5. **Check if a number is a palindrome**
6. **Print the Fibonacci series up to n terms (iteration)**
7. **Find duplicates in an array**
8. **Check if a number is even or odd**
9. **Write a program to find the factorial of a number**
10. **Swap two numbers without using a third variable**
11. **Write a program to count the number of vowels and consonants in a string**
12. **Implement a basic calculator for addition, subtraction, multiplication, and division**
13. **Find the sum of the digits of a given number**
14. **Check if a number is prime or composite**
15. **Find the missing number in an array of size n containing numbers from 1 to n+1 in C**
16. **Find all pairs in an array whose sum is equal to a given number**
17. **Write a program to remove duplicates from a sorted array**
18. **Write a program to move all zeros in an array to the end**
19. **Implement a program to check if a string contains all unique characters**
20. **Reverse the words in a sentence without reversing the letters**
21. **Reverse a linked list (iterative)**
22. **Reverse a linked list (recursive)**
23. **Find the middle element of a linked list in one traversal**
24. **Implement a queue using a circular array**
25. **Solve the Activity Selection Problem**
26. **Write a program to find the largest number possible from an array of numbers**
---
## Intermediate Questions
1. **Implement a stack using an array**
2. **Implement a queue using an array**
3. **Merge two sorted arrays into a single sorted array**
4. **Solve the Fibonacci series using recursion**
5. **Implement bubble sort algorithm**
6. **Implement insertion sort algorithm**
7. **Implement binary search for a sorted array**
8. **Implement binary search for an unsorted array**
9. **Find the second largest number in an array**
10. **Write a program to check if two strings are anagrams**
11. **Convert a decimal number to binary**
12. **Find the GCD (Greatest Common Divisor) and LCM (Least Common Multiple) of two numbers**
13. **Write a program to rotate an array by k positions**
14. **Implement a stack and its operations (push, pop, peek) using an array**
15. **Find the majority element in an array (element that appears more than n2 times)**
16. **Find the longest common prefix in an array of strings**
17. **Find the first non-repeating character in a string**
18. **Write a program to implement string compression (e.g., aaabb → a3b2)**
19. **Merge two sorted linked lists**
20. **Implement a queue using an array**
21. **Detect and remove a cycle in a linked list**
22. **Write a program to evaluate a postfix expression**
23. **Implement a min stack that supports push, pop, and retrieving the minimum element in constant time**
24. **Solve the 01 Knapsack Problem**
25. **Find the length of the longest increasing subsequence**
26. **Solve the Coin Change Problem (minimum coins needed to make a sum)**
27. **Find the longest common subsequence of two strings**
28. **Implement Huffman Encoding**
29. **Find the minimum number of coins needed for a given amount using a greedy approach**
30. **Generate all subsets of a given set using recursion**
31. **Solve the Fractional Knapsack Problem**
32. **Solve the Topological Sorting Problem for a directed acyclic graph (DAG)**
33. **Write a program to detect a cycle in a directed graph using DFS**
34. **Tree traversals (inorder, preorder, postorder)**
35. **Write a program to find the intersection of two sorted arrays**
---
## Advanced Questions
1. **Implement merge sort algorithm**
2. **Implement quicksort algorithm**
3. **Write a program to check if a linked list is a palindrome**
4. **Implement a queue using two stacks**
5. **Solve the N-Queens Problem using backtracking**
6. **Write a program to detect a cycle in a linked list**
7. **Find the shortest path in a graph using Dijkstra’s Algorithm**
8. **Check if a binary tree is a valid binary search tree (BST)**
9. **Write a program to solve the Knapsack Problem using dynamic programming**
10. **Implement depth-first search (DFS) for a graph**
11. **Implement breadth-first search (BFS) for a graph**
12. **Find the maximum area of a rectangle in a histogram**
13. **Implement the Tower of Hanoi**
14. **Write a program to compute the nth Catalan number**
15. **Design a hash map from scratch using an array and linked list**
16. **Find the connected components of an undirected graph**
17. **Implement Floyd-Warshall Algorithm for all-pairs shortest paths**
18. **Implement Kruskal’s Algorithm for finding the Minimum Spanning Tree (MST)**
19. **Solve the Snake and Ladder Problem using a graph representation**
## Miscellaneous Questions
1. **Pattern #1**
---
## Contributing
Contributions are welcome! If you have a new solution or an improvement:
1. Fork this repository.
2. Create a new branch for your feature/fix.
3. Commit your changes and open a pull request.
Please ensure your code follows the existing structure.
---
## License
Distributed under the MIT License. See [LICENSE](LICENSE) for more information.