Given a rectangular binary matrix, calculate the area of the largest rectangle of 1's in it. Assume that a rectangle can be formed by swapping any number of columns with each other.
An `M × N` Young tableau is an `M × N` matrix such that the entries of each row are sorted from left to right and the entries of each column are sorted from top to bottom.
Given an `M × N` matrix, Function to find all common elements present in every row. The idea is simple and efficient – create an empty map and insert all the first row elements into the map with their value set as 1.
Given an `M × N` rectangular grid, print all shortest routes in the grid that start at the first cell `(0, 0)` and ends at the last cell `(M-1, N-1)`. We can move down or right or diagonally (down-right), but not up or left.
Given an `M × N` binary matrix, replace all occurrences of 0’s by 1’s, which are completely surrounded by 1’s from all sides (top, left, bottom, right, top-left, top-right, bottom-left, and bottom-right).
Given two strings, determine if the first string can be transformed into the second string with a single edit operation. An edit operation can insert, remove, or replace a character in the first string.
In the k–partition problem, we need to partition an array of positive integers into `k` disjoint subsets that all have an equal sum, and they completely cover the set.
Given a positive number `n`, find all combinations of `2×n` elements such that every element from 1 to `n` appears exactly twice and the distance between its two appearances is exactly equal to the value of the element.
Given a list of words, efficiently group all anagrams. The two strings, `X` and `Y`, are anagrams if by rearranging `X's` letters, we can get `Y` using all the original letters of `X` exactly once.
Given a sequence of numbers between 2 and 9, print all possible combinations of words formed from the mobile keypad with some digits associated with each key.
Given a string, find all possible palindromic substrings in it. The problem differs from the problem of finding the possible palindromic subsequence. Unlike subsequences, substrings are required to occupy consecutive positions within the original string.
Given two strings, determine whether they are isomorphic. Two strings, `X` and `Y`, are called isomorphic if all occurrences of each character in `X` can be replaced with another character to get `Y` and vice-versa.
Given two strings, determine if they are anagrams or not. Two strings `X` and `Y` are anagrams if by rearranging the letters of `X`, we can get `Y` using all the original letters of `X` exactly once.
Given a positive number, convert the number to the corresponding Excel column name.. The main trick in this problem lies in handling the boundary cases.
Given a string, find the maximum length contiguous substring of it that is also a palindrome. For example, the longest palindromic substring of "bananas" is "anana", and the longest palindromic substring of "abdcbcdbdcbbc" is "bdcbcdb".
Given a rectangular path in the form of a binary matrix, find the length of the longest possible route from source to destination by moving to only non-zero adjacent positions.
The N–queens puzzle is the problem of placing `N` chess queens on an `N × N` chessboard so that no two queens threaten each other. Thus, the solution requires that no two queens share the same row, column, or diagonal.