Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Sign In
▲
Similar Topics
DSA
22.5k+ articles
Competitive Programming
2.3k+ articles
Algorithms
2k+ articles
Data Structures
1.1k+ articles
Recursion
1k+ articles
Graph
940+ articles
Stack
420+ articles
DFS
340+ articles
Backtracking
230+ articles
Algorithms-Recursion
59 articles
Algorithms-Backtracking
17 posts
Popular Articles
Recent Articles
Backtracking Algorithm in Python
Last Updated: 03 June 2024
Backtracking is a problem-solving algorithmic technique that involves finding a solution incrementally by trying different options and u
...read more
Backtracking
Algorithms-Backtracking
Picked
Python-DSA
DSA
CSES Solutions - Apple Division
Last Updated: 16 March 2024
There are N apples with known weights given as arr[]. Your task is to divide the apples into two groups so that the difference between the w
...read more
Competitive Programming
Recursion
Algorithms-Backtracking
Picked
DSA
CSES Problems
CSES Solutions - Chessboard and Queens
Last Updated: 27 March 2024
Your task is to place eight queens on a chessboard so that no two queens are attacking each other. As an additional challenge, each square i
...read more
Competitive Programming
Recursion
Algorithms-Backtracking
Picked
DSA
CSES Problems
Similar Topics
DSA
22.5k+ articles
Competitive Programming
2.3k+ articles
Algorithms
2k+ articles
Data Structures
1.1k+ articles
Recursion
1k+ articles
Graph
940+ articles
Stack
420+ articles
DFS
340+ articles
Backtracking
230+ articles
Algorithms-Recursion
59+ articles
Backtracking Algorithm
Last Updated: 01 December 2024
Backtracking algorithms are like problem-solving strategies that help explore different options to find the best solution. They work by tryi
...read more
Backtracking
Algorithms-Backtracking
Algorithms-Recursion
DSA
Tutorial on Path Problems in a Grid, Maze, or Matrix
Last Updated: 28 November 2023
Path in a Grid or Maze refers to problems that involve navigating through a grid-like structure from the source (starting point) to the dest
...read more
Matrix
BFS
DFS
Algorithms-Dynamic Programming
Algorithms-Backtracking
DSA
Maximum and Minimum apples distribution limits
Last Updated: 20 October 2023
Given an integer N representing a number of apples and an array weights[] consisting weight of these apples. Distribute them to K people suc
...read more
Backtracking
Algorithms-Backtracking
DSA
Minimum Distance from Boundary to Target on a 2D Matrix
Last Updated: 02 October 2023
Given a matrix of size (n*m) and a point 'p' (x, y). The matrix is given in the form of 0's and 1's. In one move you can go in any of the fo
...read more
Matrix
BFS
DFS
Algorithms-Backtracking
DSA
Print all possible ways to write N as sum of two or more positive integers
Last Updated: 02 February 2022
Given an integer N, the task is to print all the possible ways in which N can be written as the sum of two or more positive integers.Example
...read more
Greedy
Backtracking
Mathematical
Recursion
Arrays
Algorithms-Backtracking
Algorithms-Recursion
DSA
Unique subsequences of length K with given sum
Last Updated: 02 November 2023
Given an array arr[] of N integers and two numbers K and S, the task is to print all the subsequence of length K with the sum S.Examples:Inp
...read more
Arrays
Articles
Stack
Algorithms
Backtracking
Competitive Programming
subsequence
Programming Language
C++
Data Structures
CS - Placements
Algorithms-Backtracking
DSA
C/C++ Puzzles
Rat in a Maze | Backtracking using Stack
Last Updated: 01 September 2022
Prerequisites - Recursion, Backtracking and Stack Data Structure.A Maze is given as N*M binary matrix of blocks and there is a rat initially
...read more
Stack
Backtracking
Data Structures
Algorithms-Backtracking
DSA
Print all the combinations of a string in lexicographical order
Last Updated: 23 November 2021
Given a string str, print of all the combinations of a string in lexicographical order.Examples:Input: str = "ABC"Output:AABABCACACBBBABACBC
...read more
Algorithms
Backtracking
Recursion
C-String-Question
Algorithms-Backtracking
Algorithms-Recursion
lexicographic-ordering
DSA
Print all the cycles in an undirected graph
Last Updated: 24 February 2025
Given an undirected graph, print all the vertices that form cycles in it. Input: In the above diagram, the cycles have been marked with dark
...read more
Graph
DFS
Algorithms-Backtracking
graph-cycle
Graph Coloring
DSA
Introduction to Backtracking
Last Updated: 24 June 2024
Backtracking is like trying different paths, and when you hit a dead end, you backtrack to the last choice and try a different route. In thi
...read more
Backtracking
Branch and Bound
Recursion
Algorithms-Backtracking
Picked
DSA
Tutorials
DSA Tutorials
Boggle (Find all possible words in a board of characters) | Set 1
Last Updated: 22 April 2025
You are given a list of strings, words[], and an n × m matrix of characters, letters[][]. The objective is to locate all the words from wor
...read more
Amazon
Graph
DFS
Algorithms-Backtracking
DSA
Algorithms | Backtracking | Question 1
Last Updated: 10 February 2013
Which of the following is not a backtracking algorithm?(A) Knight tour problem
...read more
DSA Quiz
Algorithms-Backtracking
1
2
>>
Last
1
2
>>
Last
1
2
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !