id int64 1 2k | content stringlengths 272 88.9k | title stringlengths 3 77 | title_slug stringlengths 3 79 | question_content stringlengths 230 5k | question_hints stringclasses 695
values | tag stringclasses 618
values | level stringclasses 3
values | similar_question_ids stringclasses 822
values |
|---|---|---|---|---|---|---|---|---|
76 | it has been asked by Facebook Tik Tok Amazon lyt Google yendex Snapchat nagaro Adobe Airbnb LinkedIn Microsoft Apple Spotify Uber we can have let's quickly see what the problem says the problem is simply short and simple saying that we have two strings s and D of length M and N okay respectively uh just one thing in th... | Minimum Window Substring | minimum-window-substring | Given two strings `s` and `t` of lengths `m` and `n` respectively, return _the **minimum window**_ **_substring_** _of_ `s` _such that every character in_ `t` _(**including duplicates**) is included in the window_. If there is no such substring, return _the empty string_ `" "`.
The testcases will be generated such tha... | Use two pointers to create a window of letters in S, which would have all the characters from T. Since you have to find the minimum window in S which has all the characters from T, you need to expand and contract the window using the two pointers and keep checking the window for all the characters. This approach is als... | Hash Table,String,Sliding Window | Hard | 30,209,239,567,632,727 |
1,844 | all right let's talk about replace all digits with characters so the idea is that you shift how many times after c so for example fight five times after a you get f and then there's a constraint it's guaranteed let your shift never exist z so the maximum for a is 25 a plus 25 is 26 right but for this is simple a right ... | Replace All Digits with Characters | maximum-number-of-balls-in-a-box | You are given a **0-indexed** string `s` that has lowercase English letters in its **even** indices and digits in its **odd** indices.
There is a function `shift(c, x)`, where `c` is a character and `x` is a digit, that returns the `xth` character after `c`.
* For example, `shift('a', 5) = 'f'` and `shift('x', 0) =... | Note that both lowLimit and highLimit are of small constraints so you can iterate on all nubmer between them You can simulate the boxes by counting for each box the number of balls with digit sum equal to that box number | Hash Table,Math,Counting | Easy | null |
1,470 | hi guys let's talk about a google interview question today the question is lead code 147 or shuffle the array uh it goes something like this given that a number consisting of two n elements in the form x 1 x 2 x 3 until x n y 1 y 2 y 3 so on until y n you have to return the array in the form x 1 y 1 x 2 y 2 x 3 y 3 and... | Shuffle the Array | tweet-counts-per-frequency | Given the array `nums` consisting of `2n` elements in the form `[x1,x2,...,xn,y1,y2,...,yn]`.
_Return the array in the form_ `[x1,y1,x2,y2,...,xn,yn]`.
**Example 1:**
**Input:** nums = \[2,5,1,3,4,7\], n = 3
**Output:** \[2,3,5,4,1,7\]
**Explanation:** Since x1\=2, x2\=5, x3\=1, y1\=3, y2\=4, y3\=7 then the answer ... | null | Hash Table,Binary Search,Design,Sorting,Ordered Set | Medium | null |
489 | hey everyone and welcome to another Elite code problem so today we're going to be doing problem number 489 robot room cleaner and it's a backtracking problem it's a hard one it's probably one of the hardest backtracking problems I've done um even if you know like backtracking there's a lot of annoying parts of this pro... | Robot Room Cleaner | kth-smallest-instructions | You are controlling a robot that is located somewhere in a room. The room is modeled as an `m x n` binary grid where `0` represents a wall and `1` represents an empty slot.
The robot starts at an unknown location in the room that is guaranteed to be empty, and you do not have access to the grid, but you can move the r... | There are nCr(row + column, row) possible instructions to reach (row, column). Try building the instructions one step at a time. How many instructions start with "H", and how does this compare with k? | Array,Math,Dynamic Programming,Combinatorics | Hard | null |
62 | cool 62 unique paths will bite it's located on the top left corner over m-by-n great the robot can only move m-by-n great the robot can only move m-by-n great the robot can only move either down or right at any point in time well by trying to reach the bottom right corner and the grid how many possible unique paths are... | Unique Paths | unique-paths | There is a robot on an `m x n` grid. The robot is initially located at the **top-left corner** (i.e., `grid[0][0]`). The robot tries to move to the **bottom-right corner** (i.e., `grid[m - 1][n - 1]`). The robot can only move either down or right at any point in time.
Given the two integers `m` and `n`, return _the nu... | null | Math,Dynamic Programming,Combinatorics | Medium | 63,64,174,2192 |
1,732 | welcome to code map today we are going to discuss daily record challenge find the highest altitude now let's discuss the question there is a biker going on a road trip the road trip consists of n plus one points at different altitudes the biker status strip at point zero with Attitude equal to zero you are given an int... | Find the Highest Altitude | minimum-one-bit-operations-to-make-integers-zero | There is a biker going on a road trip. The road trip consists of `n + 1` points at different altitudes. The biker starts his trip on point `0` with altitude equal `0`.
You are given an integer array `gain` of length `n` where `gain[i]` is the **net gain in altitude** between points `i` and `i + 1` for all (`0 <=... | The fastest way to convert n to zero is to remove all set bits starting from the leftmost one. Try some simple examples to learn the rule of how many steps are needed to remove one set bit. consider n=2^k case first, then solve for all n. | Dynamic Programming,Bit Manipulation,Memoization | Hard | 2119 |
1,716 | hello everyone today we are going to calculate money in lit code bank which is a problem which is a Del quing of today so uh basically what is happening is that you have a certain number of day which is the number of input n and then from that input you are supposed to compute the total amount that has been saved in th... | Calculate Money in Leetcode Bank | maximum-non-negative-product-in-a-matrix | Hercy wants to save money for his first car. He puts money in the Leetcode bank **every day**.
He starts by putting in `$1` on Monday, the first day. Every day from Tuesday to Sunday, he will put in `$1` more than the day before. On every subsequent Monday, he will put in `$1` more than the **previous Monday**.
Given... | Use Dynamic programming. Keep the highest value and lowest value you can achieve up to a point. | Array,Dynamic Programming,Matrix | Medium | null |
201 | Hello and welcome tool again this is Shaur Awasti and today we will talk about a medium level problem of lead code which is bit wise and of number range so basically what is in it, in this we are given left and right and what is we have to tell that in What will be the end of all, like suppose five and six and sane, wh... | Bitwise AND of Numbers Range | bitwise-and-of-numbers-range | Given two integers `left` and `right` that represent the range `[left, right]`, return _the bitwise AND of all numbers in this range, inclusive_.
**Example 1:**
**Input:** left = 5, right = 7
**Output:** 4
**Example 2:**
**Input:** left = 0, right = 0
**Output:** 0
**Example 3:**
**Input:** left = 1, right = 2147... | null | Bit Manipulation | Medium | null |
1,961 | um hello so today we are going to do this problem called check if string is a prefix of array so the problem says we get a string s and then array um of string words and we want to determine whether s is a prefix of strings of orders okay so we get s and then we get an array that is a string of words okay so this is ar... | Check If String Is a Prefix of Array | maximum-ice-cream-bars | Given a string `s` and an array of strings `words`, determine whether `s` is a **prefix string** of `words`.
A string `s` is a **prefix string** of `words` if `s` can be made by concatenating the first `k` strings in `words` for some **positive** `k` no larger than `words.length`.
Return `true` _if_ `s` _is a **prefi... | It is always optimal to buy the least expensive ice cream bar first. Sort the prices so that the cheapest ice cream bar comes first. | Array,Greedy,Sorting | Medium | null |
1,650 | hey this is josh from leak dev where we try to explain programming questions as simple and concise as we can today we'll be talking about the lowest common ancestor of a binary tree according to leed code this question has been asked quite frequently by facebook amazon microsoft and just from my own personal experience... | Lowest Common Ancestor of a Binary Tree III | find-root-of-n-ary-tree | Given two nodes of a binary tree `p` and `q`, return _their lowest common ancestor (LCA)_.
Each node will have a reference to its parent node. The definition for `Node` is below:
class Node {
public int val;
public Node left;
public Node right;
public Node parent;
}
According to the **[definition of ... | Node with indegree 0 is the root | Hash Table,Bit Manipulation,Tree,Depth-First Search | Medium | 1655 |
103 | hello everyone welcome to coding decoded my name isja I'm working at sd5 at Adobe and after a very long time I have come on to creating a new video because uh all the questions in the month of February seems like an easy question and most of them were already solved by me already and for those who were not I believe th... | Binary Tree Zigzag Level Order Traversal | binary-tree-zigzag-level-order-traversal | Given the `root` of a binary tree, return _the zigzag level order traversal of its nodes' values_. (i.e., from left to right, then right to left for the next level and alternate between).
**Example 1:**
**Input:** root = \[3,9,20,null,null,15,7\]
**Output:** \[\[3\],\[20,9\],\[15,7\]\]
**Example 2:**
**Input:** roo... | null | Tree,Breadth-First Search,Binary Tree | Medium | 102 |
119 | welcome to august leeco challenge today's problem is pascal's triangle two given the non-negative index k we turn given the non-negative index k we turn given the non-negative index k we turn the kth index of a pascal's triangle is represented nicely in this graphic where every row has one more cell than its previous r... | Pascal's Triangle II | pascals-triangle-ii | Given an integer `rowIndex`, return the `rowIndexth` (**0-indexed**) row of the **Pascal's triangle**.
In **Pascal's triangle**, each number is the sum of the two numbers directly above it as shown:
**Example 1:**
**Input:** rowIndex = 3
**Output:** \[1,3,3,1\]
**Example 2:**
**Input:** rowIndex = 0
**Output:** \[... | null | Array,Dynamic Programming | Easy | 118,2324 |
438 | Hello Hi Everyone Jasmine Chakraborty And Today Will Be Discussing Problem Number 1434 Let Code Find All Programs In History 109 This Is A Problem Dentist In Bittu Of Every Day I Am Not Challenge In Its Food Should You To Problem Avoid Yesterday I Want From You Can Be Sent out from Play List to Play List Soe Hind is th... | Find All Anagrams in a String | find-all-anagrams-in-a-string | Given two strings `s` and `p`, return _an array of all the start indices of_ `p`_'s anagrams in_ `s`. You may return the answer in **any order**.
An **Anagram** is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.
**Example 1:**
*... | null | Hash Table,String,Sliding Window | Medium | 242,567 |
103 | hey everyone welcome back to the channel i hope you guys are doing extremely well so today we will be discussing the zigzag traversal from the frika tree series now what does this traversal means so in the previous traversal that is the level order traversal you saw that the traversal was like one two three then a four... | Binary Tree Zigzag Level Order Traversal | binary-tree-zigzag-level-order-traversal | Given the `root` of a binary tree, return _the zigzag level order traversal of its nodes' values_. (i.e., from left to right, then right to left for the next level and alternate between).
**Example 1:**
**Input:** root = \[3,9,20,null,null,15,7\]
**Output:** \[\[3\],\[20,9\],\[15,7\]\]
**Example 2:**
**Input:** roo... | null | Tree,Breadth-First Search,Binary Tree | Medium | 102 |
1,812 | hello guys my name is Ursula and welcome back to my channel and today we are going to solve a new lead code question that is determined color of a chessboard Square we will be solving this question with the help of python the question said you are given coordinates a string that represents the coordinates of a square o... | Determine Color of a Chessboard Square | reformat-phone-number | You are given `coordinates`, a string that represents the coordinates of a square of the chessboard. Below is a chessboard for your reference.
Return `true` _if the square is white, and_ `false` _if the square is black_.
The coordinate will always represent a valid chessboard square. The coordinate will always have t... | Discard all the spaces and dashes. Use a while loop. While the string still has digits, check its length and see which rule to apply. | String | Easy | null |
374 | hello everyone welcome to kodus camp we are 12th day of october lead code challenge and the problem we are going to cover in this video is guess number higher or lower it is again a easy category problems the input given here is an integer value n and we have to return the number we picked so the problem statement has ... | Guess Number Higher or Lower | guess-number-higher-or-lower | We are playing the Guess Game. The game is as follows:
I pick a number from `1` to `n`. You have to guess which number I picked.
Every time you guess wrong, I will tell you whether the number I picked is higher or lower than your guess.
You call a pre-defined API `int guess(int num)`, which returns three possible re... | null | Binary Search,Interactive | Easy | 278,375,658 |
1,799 | hey everyone welcome back and let's write some more neat code today so today let's solve the problem maximize score after n operations this one is pretty hard but it's not as crazy as you might think and if you're not super familiar with bit masks this is an opportunity to learn a bit about them no pun intended but we ... | Maximize Score After N Operations | minimum-incompatibility | You are given `nums`, an array of positive integers of size `2 * n`. You must perform `n` operations on this array.
In the `ith` operation **(1-indexed)**, you will:
* Choose two elements, `x` and `y`.
* Receive a score of `i * gcd(x, y)`.
* Remove `x` and `y` from `nums`.
Return _the maximum score you can rec... | The constraints are small enough for a backtrack solution but not any backtrack solution If we use a naive n^k don't you think it can be optimized | Array,Dynamic Programming,Bit Manipulation,Bitmask | Hard | null |
End of preview. Expand in Data Studio
LeetCode Information & YouTube Captions
Original data -> LimYeri/leetcode_with_youtube_captions
The original ['cc_content'] column had many repeated sentences, making the data too long.
To remove the repetitions, we used precise regular expressions to eliminate the repeated sentences. -> new column ['content']
Additionally, we also removed unnecessary strings (e.g., '[Music]').
- Downloads last month
- 60