Search a word in a 2D matrix of characters
Problem Statement: You are given a 2D board(N rows and M columns) of characters and a string “word”. Your task is to check if the… Read More »Search a word in a 2D matrix of characters
Problem Statement: You are given a 2D board(N rows and M columns) of characters and a string “word”. Your task is to check if the… Read More »Search a word in a 2D matrix of characters
Given a string s, rearrange the characters of s so that any two adjacent characters are not the same. Return any possible rearrangement of s or return “” if not possible. Example… Read More »Rearrange the characters of string such that any two adjacent characters are not the same.
Problem Link Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: “tree” Output: “eert” Explanation: ‘e’ appears… Read More »Leetcode 451. Sort Characters By Frequency