874. Walking Robot Simulation
A robot on an infinite XY-plane starts at point (0, 0) facing north. The robot can receive a sequence of these three […]
A robot on an infinite XY-plane starts at point (0, 0) facing north. The robot can receive a sequence of these three […]
There are n stairs, and a person standing at the bottom wants to reach the top. The person can climb either 1 stair
You are given a string s consisting of lowercase English letters, and an integer k. First, convert s into an integer by replacing each letter with
Given two strings str1 and str2. The task is to remove or insert the minimum number of characters from/in str1 so as to transform it into str2. It could be possible
There are n students in a class numbered from 0 to n – 1. The teacher will give each student a problem starting with the
Given a square grid of size N, each cell of which contains an integer cost that represents a cost to traverse through that
You are given a 0-indexed 1-dimensional (1D) integer array original, and two integers, m and n. You are tasked with creating a 2-dimensional (2D) array with
Given two sorted arrays of distinct integers arr1 and arr2. Each array may have some elements in common with the other array. Find the maximum sum of a
Given a string s and a dictionary of strings wordDict, add spaces in s to construct a sentence where each word is a valid dictionary
You are given an array arr, you need to find any three elements in it such that arr[i] < arr[j] <
You are given an undirected weighted connected graph containing n nodes labeled from 0 to n – 1, and an integer array edges where edges[i] = [ai, bi, wi] indicates that there
The n-queens puzzle is the problem of placing n queens on a (n×n) chessboard such that no two queens can attack each other.Given an integer n,