Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase
Consider the 2D grid formed by integer points on the XY Plane. The position of the Sniper and the Target are lattice points in this grid. The bullet shot by the Sniper will follow a straight line trajectory from (x1, y1) to (x2, y2). The bullet goes no further than (x2, y2).
This problem is related to string handling and manipulation. So the original string which is sent to Cybertron is encrypted in the new string which comprises the letters followed by each time it has occurred in the original string.
Three dinos decide to play a game. In one move, one of the outer dinos can hop into a spot between the other two. Help them maximise their duration of play.
There are several sticks each 1 inch long. Your job is to form a rectangle with the biggest possible area, using these sticks as the perimeter.
The number of possible Binary Search Trees with n keys is Catalan Number (Cn). You could learn about Catalan Number & Binomial Coefficient.
Catalan numbers (Cn) are a sequence of natural numbers. Nth Catalan number has applications in many counting problems.
The recomputations in calculating binomial coefficient (nCr) can be avoided by exploiting optimal substructure and overlapping subproblems
Starting with a 1-indexed array of zeros and a list of operations, for each operation add a value to each the array element between two given indices, inclusive. Once all operations have been performed, return the maximum value in the array.
Given a string of lowercase letters in the range ascii[a-z], determine the index of a character that can be removed to make the string a palindrome