Welcome To Tutorialspoint.dev
Officially launched 18th May 2019

# Rat in a Maze Backtracking-2

We have discussed Backtracking and Knight&#x2019;s tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be solved using Backtracki...

# Sort an array of 0s, 1s and 2s

Given an array A[] consisting 0s, 1s and 2s, write a function that sorts A[]. The functions should put all 0s first, then all 1s and all 2s in last. Examples: Input :...

# Sort an array of 0s, 1s and 2s

Given an array A[] consisting 0s, 1s and 2s, write a function that sorts A[]. The functions should put all 0s first, then all 1s and all 2s in last. Examples: Input :...

# Sort an array of 0s, 1s and 2s

Given an array A[] consisting 0s, 1s and 2s, write a function that sorts A[]. The functions should put all 0s first, then all 1s and all 2s in last. Examples: Input :...

# Rat in a Maze Backtracking-2

We have discussed Backtracking and Knight&#x2019;s tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be solved using Backtracki...

# Check for balanced parentheses in an expression

Given an expression string exp , write a program to examine whether the pairs and the orders of &#x201C;{&#x201C;,&#x201D;}&#x201D;,&#x201D;(&#x201C;,&#x201D;)&#x201...