Courses
Tutorials
Practice
Jobs
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
When do we pass arguments by pointer?
In C, the pass-by pointer method allows users to pass the address of an argument to the function instead of the actual value. This allows programmers to change the actual ...
Read More
C++
pointer
C-Pointers
Python Program for N Queen Problem | Backtracking-3
The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other. For example, the following is a solution for 4 Queen pro...
Read More
Python
Python DSA-exercises
Java Program for N Queen Problem | Backtracking-3
The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other. For example, the following is a solution for 4 Queen pro...
Read More
Java
C Program for N Queen Problem | Backtracking-3
The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other. For example, the following is a solution for 4 Queen pro...
Read More
C Language
N Queen Problem
Place n queens on an n×n chessboard so that no two attack each other (same row, column, or diagonal). Return all valid arrangements, where each solution shows the column p...
Read More
Backtracking
DSA
Amazon
Twitter
Accolite
MAQ Software
Visa
Amdocs
chessboard-problems
Python Program for Rat in a Maze | Backtracking-2
We have discussed Backtracking and Knight's tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be solved using Backtracking.Consider a...
Read More
Python
Java Program for Rat in a Maze | Backtracking-2
We have discussed Backtracking and Knight's tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be solved using Backtracking.A Maze is ...
Read More
Java
C Program for Rat in a Maze | Backtracking-2
We have discussed Backtracking and Knight's tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be solved using Backtracking.Consider a...
Read More
C Language
Rat in a Maze
Given a binary matrix maze[][] of size n × n containing values 0 and 1, find all possible paths for a rat to travel from the source cell (0, 0) to the destination cell (n ...
Read More
Backtracking
Matrix
DSA
Amazon
Flipkart
Drishti-Soft
Yatra.com
Expedia
Paytm
MakeMyTrip
Visa
Grofers
Numerify
Zycus
The Knight's Tour
Given an integer n, consider an n × n chessboard. A Knight starts at the top-left corner (0, 0) and must visit every cell exactly once following the Knight’s standard move...
Read More
Backtracking
Mathematical
DSA
Amazon
chessboard-problems
Multidimensional Pointer Arithmetic in C/C++
In C/C++, arrays and pointers have similar semantics, except on type information.As an example, given a 3D arrayint buffer[5][7][6];An element at location [2][1][2] can be...
Read More
C++
pointer
Edit Distance
Given two strings s1 and s2 and below operations that can be performed on s1. The task is to find the minimum number of edits (operations) to convert 's1' into 's2'. Inse...
Read More
Dynamic Programming
DSA
Amazon
edit-distance
How does free() know the size of memory to be deallocated?
Consider the following prototype of free() function which is used to free memory allocated using malloc() or calloc() or realloc().C void free(void *ptr); ...
Read More
C Language
C-Dynamic Memory Allocation
Spaghetti Stack
Spaghetti stackA spaghetti stack is an N-ary tree data structure in which child nodes have pointers to the parent nodes (but not vice-versa)Spaghetti stack structure is u...
Read More
Stack
Advanced Data Structure
DSA
Minimum distance between two in an array
Given an unsorted array arr[] and two numbers x and y, find the minimum distance between x and y in arr[]. The array might also contain duplicates. You may assume that bot...
Read More
DSA
Arrays
Paytm
1
...
12124
12125
12126
12127