2045. Second Minimum Time to Reach Destination
A city is represented as a bi-directional connected graph with n vertices where each vertex is labeled from 1 to n (inclusive). The edges in the graph are […]
A city is represented as a bi-directional connected graph with n vertices where each vertex is labeled from 1 to n (inclusive). The edges in the graph are […]
Given a string str without spaces, the task is to remove all duplicate characters from it, keeping only the first occurrence. Note: The
You are given two 0-indexed strings source and target, both of length n and consisting of lowercase English letters. You are also given two 0-indexed character arrays original and changed, and an integer array cost,
Given a string, find the minimum number of characters to be inserted to convert it to a palindrome. Examples :
There are n cities numbered from 0 to n-1. Given the array edges where edges[i] = [fromi, toi, weighti] represents a bidirectional and weighted edge between cities fromi and toi, and given
Given a string str and an integer k, return true if the string can be changed into a pangram after at most k operations, else
Given an array of integers nums, sort the array in ascending order and return it. You must solve the problem without using
Given a sorted array. Convert it into a Height Balanced Binary Search Tree (BST). Return the root of the BST. Height-balanced BST means a binary tree in
You are given a 0-indexed integer array mapping which represents the mapping rule of a shuffled decimal system. mapping[i] = j means digit i should be mapped to
Given the root of a binary tree. Check whether it is a BST or not.Note: We are considering that BSTs can not
Given an array of integers nums, sort the array in increasing order based on the frequency of the values. If multiple values have
Given two BSTs, return elements of merged BSTs in sorted form. Examples : Input: BST1: 5 / \ 3 6