## Travelling Salesman Problem implementation using BackTracking

Travelling Salesman Problem (TSP): Given a set of cities and distance between every pair of cities, the problem is to find the shortest possible route… Read More »

- Print all permutations of a string in Java
- Java Program to print distinct permutations of a string
- Place K-knights such that they do not attack each other
- Minimum cost to reach a point N from 0 with two different operations allowed
- Unique paths covering every non-obstacle block exactly once in a grid
- Java ArrayList to print all possible words from phone digits
- Travelling Salesman Problem implementation using BackTracking
- Generate all the binary strings of N bits
- Print all permutation of a string using ArrayList
- Minimum swaps to group similar characters side by side?
- Horizontally Flip a Binary Matrix
- Print path from root to all nodes in a Complete Binary Tree
- Find triplet such that number of nodes connecting these triplets is maximum

Travelling Salesman Problem (TSP): Given a set of cities and distance between every pair of cities, the problem is to find the shortest possible route… Read More »

Given a Tree with N nodes, the task is to find a triplet of nodes (a, b, c) such that the number of nodes covered… Read More »

Given a number N which is the total number of nodes in a complete binary tree where nodes are number from 1 to N sequentially… Read More »

Given a positive integer number N. The task is to generate all the binary strings of N bits. These binary strings should be in ascending… Read More »

Given a string str, the task is to print all the distinct permutations of str. A permutation is an arrangement of all or part of… Read More »

Given a keypad of a mobile, and keys that need to be pressed, the task is to print all the words which are possible to… Read More »

Given a grid grid[][] with 4 types of blocks: 1 represents the starting block. There is exactly one starting block. 2 represents the ending block.… Read More »

Given a string str, the task is to print all the permutations of str. A permutation is an arrangement of all or part of a… Read More »

Given integers M, N and K, the task is to place K knights on an M*N chessboard such that they don’t attack each other. The… Read More »

Given a string, find minimum no of swaps(not necessarily adjacent) to convert it into a string which have similar characters side by side. Examples: Input… Read More »

Given a binary matrix. The task is to flip the matrix horizontally(find the image of the matrix), then invert it. Note: To flip a matrix… Read More »

Given integers N, P and Q where N denotes the destination position. The task is to move from position 0 to position N with minimum… Read More »

Given a chessboard of size 8 x 8 and the current position of Mirandote. All the rules of this chess game are same but the… Read More »

In our daily lives, we have to remember a lot of phone numbers. Most people find it quite difficult to remember such huge 10-digit phone… Read More »