EdocGram
Home
(current)
Topics
EdocAI
Code Editor
HTML
Javascript
PHP
Python
Python AI Code Editor
More
Contact
About
Privacy Policy
Terms and Conditions
Log In
Topic
View
More
Topic
Hashing
Linked List
Queue
Stack
Backtracking
Dynamic Programming
Graph Theory
Bit Manipulation
Mathematics
Sliding Window Technique
Divide And Conquer
Matrix Manipulation
Two Pointers
Tree
Topic: backtracking-problem / Level: beginner
1. Generate all subsets of a given set of integers, ensuring each subset is unique and properly formatted in output.
2. Solve the classic N-Queens problem for a 4x4 chessboard, ensuring no two queens can attack each other in the solution.
3. Find all permutations of a given string, taking into account the uniqueness of characters. Return the permutations in lexicographical order.
4. Generate all valid parentheses combinations for a given number of pairs. Ensure that each combination adheres to proper opening and closing rules.
5. Print all binary strings of length n, where n is a positive integer provided by the user. Ensure that all strings are unique.
6. Solve the Rat in a Maze problem for a 4x4 grid, determining all possible paths from the start to the exit without obstacles.
7. Find all paths from the top-left corner to the bottom-right corner of a given matrix while only moving down or right.
8. Generate all possible letter combinations from a phone number, where each digit corresponds to a set of letters. Return the combinations.
9. Solve the Sudoku problem for a 4x4 grid. Ensure the solution meets all standard Sudoku rules regarding numbers and their placement.
10. Find all combinations of a given array where the elements sum to a specific target value. Include all unique combinations in the output.
11. Print all unique subsets of a set that contains duplicate elements. Ensure no duplicate subsets are printed in the final result.
12. Solve the Knights Tour problem for a 5x5 chessboard. Determine a valid sequence of moves for the knight covering all squares.
13. Find all unique palindromic partitions of a given string. Each substring must be a palindrome, and no duplicates should appear.
14. Generate all combinations of a given string, ensuring that combinations of various lengths are included and printed in the output.
15. Find all valid placements of 3 non-attacking rooks on a 3x3 chessboard. Ensure no two rooks threaten each other in the solution.
16. Generate all subsets of an array with duplicate elements, ensuring that the subsets returned do not contain any duplicates.
17. Solve the Tug of War partition problem where you divide an array of integers into two groups with minimal difference in their sums.
18. Find all unique paths in a maze with obstacles represented by a grid. Determine how many ways you can reach the exit.
19. Print all lexicographical permutations of a given set of numbers. Ensure that the output is in ascending order based on the permutations.
20. Solve the Hamiltonian Path problem for a small graph represented as an adjacency matrix. Find all valid paths that cover every vertex.
21. Generate all combinations of coin denominations that sum to a target amount. Return all possible combinations that can achieve this sum.
22. Print all valid sequences of operations to evaluate a target number using a set of numbers. Ensure all combinations are considered.
23. Solve the Subset Sum problem for a given set of integers, finding all subsets that sum up to a specified target value.
24. Generate all possible ways to partition a number into smaller numbers, ensuring that each partition is unique and formatted correctly.
25. Find all unique combinations of k numbers from a given array of n numbers. Ensure that the output contains no duplicates.
26. Solve the Combination Sum problem, where you need to find all unique combinations of numbers that sum up to a target value.
27. Print all valid parenthesis sequences for n pairs of parentheses, ensuring that each sequence is correctly formed and valid.
28. Generate all possible arrangements of k distinct items chosen from a set of n distinct items, including all unique orderings.
29. Find all unique paths in a grid where you can only move down or right. Return the number of distinct paths to reach the end.
30. Solve the Word Search problem where you must find all instances of a word in a 2D grid of characters. Ensure no duplicates.
31. Generate all possible combinations of a given string with a mix of uppercase and lowercase letters, ensuring distinct outputs.
32. Find all unique palindromic substrings in a given string. Each substring should be a palindrome, and duplicates should be excluded.
33. Print all combinations of k digits from a given n-digit number. Ensure that the output includes all unique combinations.
34. Solve the Crossword Puzzle problem, filling in a grid based on given words and ensuring that all placements are valid.
35. Find all possible paths in a binary tree from the root to leaves. Return the paths in a list, ensuring each path is unique.
36. Generate all combinations of k items from a list of n items without replacement, ensuring no duplicate combinations in the output.
37. Solve the Maze problem, determining if there exists a path from the start point to the endpoint, avoiding any walls or obstacles.
38. Find all combinations of positive integers that sum to a given target. Each combination should be unique and properly formatted.
39. Print all unique ways to fill a grid with numbers such that each row and column contains distinct elements without duplicates.
40. Generate all distinct arrangements of a set of numbers, taking into account possible duplicate elements in the input list.
41. Solve the Tower of Hanoi problem, determining the steps required to move a stack of disks from one peg to another.
42. Find all ways to distribute m identical objects into n distinct boxes, ensuring that each distribution is unique and valid.
43. Print all valid paths from the top-left corner to the bottom-right corner of a grid with some blocked cells. No diagonal moves allowed.
44. Generate all unique ways to arrange n different books on a shelf. Each arrangement should be properly formatted and counted.
45. Solve the Queens Puzzle for a 4x4 chessboard, finding all unique ways to position the queens without them attacking each other.
46. Find all possible combinations of k numbers that can form a valid triangle from a given array of numbers, ensuring no duplicates.
47. Print all unique palindromic partitions of a string, where each substring must be a palindrome, and no duplicates are allowed.
48. Generate all subsets of a set where each subset is sorted in ascending order.
49. Find all arrangements of a given set of numbers that satisfy a specific condition such as sum or product.
50. Print all valid combinations of numbers from 1 to n that can be formed to create a specific sum.
Previous
1
2
...
21
Next
More Levels
Intermediate
Advanced
Aniket The Programmer
This website is managed by aniket the programmer :)
Website
Instagram