LeetCode - The World's Leading Online Programming Learning Platform
LeetCode - The World's Leading Online Programming Learning Platform
(/problems/maximum-
explore/) Problems(/problemset/all/) Contest(/contest/) Discuss(/discuss/) Interview Store 2 number-of-moves-in-a-
grid/)
in 11 days
Join our Contest Biweekly Contest 143 (/contest/biweekly-contest-143)
in 5 days
Join our Contest Weekly Contest 422 (/contest/weekly-contest-422)
Advertisement
2 years ago
LeetCode (/LeetCode) posted Join us to code continuously, such as completing the November Daily Coding Challenge!
(/LeetCode) (/discuss/topic/2347978)
--- Hi LeetCoders! 📲 Do you love LeetCode, and want to practice daily? Have you found yourself wishing to join a study group, or to have a
group of users to...
13 hours ago
An anonymous user posted Google New Grad L3 | NA | Offer (/discuss/topic/5980500)
(/) I find there aren't a lot of resources on here related to the North American side for Google and even fewer happy stories. So I really want to share my...
8 hours ago
An anonymous user posted Salesforce | SMTS | Offer (/discuss/topic/5981062)
(/) I recently cleared an interview at Salesforce for the SMTS role. Work Experience: 4+ years Location: Hyderabad Compensation Details: Base Salary: 58 LPA
Performance Bonus: 15% of Base RSU: $74,000 USD Relocation: 1.5 LPA I've decided to join...
18 hours ago
An anonymous user posted Optmyzr | SDE1 | Hyderabad (/discuss/topic/5980053)
(/) Years of Experience: 0 Company: Optmyzr Title: Software Development Engineer Location: Hyderabad, India Base: 14L Relocation/Signing Bonus: 1.5L
(allowance)+ 1.25L Incentive Program: 17.5L (1+2+3.25+4.75+6.5 payable every year) Target Bonus: 1L Non-cash Benefits: Meals, Snacks, Offsite, Health
insurance, Training,...
9 hours ago
An anonymous user posted 🌟 Sharing My Interview Experience with Meta! 🌟 (/discuss/topic/5981031)
(/) I’m excited to share that I received an offer from Meta after going through their interview process! It consisted of one screening round followed by four
onsite interviews: two coding...
2 days ago
An anonymous user posted Zepto | SDE II | Bangalore | Offer (/discuss/topic/5973370)
(/) | Category | Details ...
2 days ago
An anonymous user posted Amazon OA (/discuss/topic/5975642)
(/)
17 hours ago
An anonymous user posted Amazon SDE Intern 6m (July-Dec) OA (/discuss/topic/5980133)
(/) Recently gave the OA for sde intern 2025 India (Jul-Dec) for amazon. Consisted of 2 coding questions, and 2 survey like questionaires: - Ist question
involved an easy array problem where I...
https://leetcode.com 1/4
10/29/24, 8:41 PM LeetCode - The World's Leading Online Programming Learning Platform
2 days ago
An anonymous user posted Amazon | SDE intern | 6 months (/discuss/topic/5976281)
(/) Education: BTech circuital from NIT (2025 graduate) Years of Experience: 0 Prior Experience: 0 Date of the Offer: Oct 2024 Company: Amazon(OFF
CAMPUS) Title/Level: SDE intern Location: Bangalore Salary: Rs 1,10,000/month Relocation/Signing Bonus: Rs 2,00,000 one time Duration: 6...
21 hours ago
An anonymous user posted Amazon OA | SDE-II (/discuss/topic/5979200)
(/) Question 1 : Data analysts at Amazon are studying the trends in movies and shows popular on Prime Video in order to enhance the user experience. They
have identified the best...
Advertisement
a day ago
The database question Second Highest Salary II (/problems/second-highest-salary-ii/) has been published
Table: employees +------------------+---------+ | Column Name | Type | +------------------+---------+ | emp_id | int ...
2 days ago
The Maximum Number of Moves in a Grid solution (/articles/maximum-number-of-moves-in-a-grid/) has been published
You are given a 0-indexed m x n matrix grid consisting of positive integers. You can start at any cell in the first column of the matrix, and traverse the
grid...
2 days ago
Check out our leaderboard (/contest/weekly-contest-421/ranking) for Weekly Contest 421 (/contest/weekly-contest-421)
Top 3 Contestants:
newbieguy (/newbieguy/) nikhilnanda47 (/nikhilnanda47/) pika_code (/pika_code/)
3 days ago
Check out our leaderboard (/contest/biweekly-contest-142/ranking) for Biweekly Contest 142 (/contest/biweekly-contest-142)
Top 3 Contestants:
arnab_01dev (/arnab_01dev/) duhlavya (/duhlavya/) Astatine08 (/Astatine08/)
4 days ago
The Longest Square Streak in an Array solution (/articles/longest-square-streak-in-an-array/) has been published
You are given an integer array nums. A subsequence of nums is called a square streak if: The length of the subsequence is at least 2, and after sorting
the subsequence, each...
4 days ago
The Circular Sentence solution (/articles/circular-sentence/) has been published
A sentence is a list of words that are separated by a single space with no leading or trailing spaces. For example, "Hello World", "HELLO", "hello world
hello world" are all...
4 days ago
The Find If Array Can Be Sorted solution (/articles/find-if-array-can-be-sorted/) has been published
You are given a 0-indexed array of positive integers nums. In one operation, you can swap any two adjacent elements if they have the same number of
set bits. You are...
7 days ago
The Flip Equivalent Binary Trees solution (/articles/flip-equivalent-binary-trees/) has been published
For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child subtrees. A binary tree X is flip
equivalent to...
8 days ago
The Cousins in Binary Tree II solution (/articles/cousins-in-binary-tree-ii/) has been published
https://leetcode.com 2/4
10/29/24, 8:41 PM LeetCode - The World's Leading Online Programming Learning Platform
Given the root of a binary tree, replace the value of each node in the tree with the sum of all its cousins' values. Two nodes of a binary tree are...
9 days ago
The database question Find Cities in Each State II (/problems/find-cities-in-each-state-ii/) has been published
Table: cities +-------------+---------+ | Column Name | Type | +-------------+---------+ | state | varchar | | city |...
Advertisement
9 days ago
Check out our leaderboard (/contest/weekly-contest-420/ranking) for Weekly Contest 420 (/contest/weekly-contest-420)
Top 3 Contestants:
Res1StAnce7 (/Res1StAnce7/) arignote (/arignote/) theabbie (/theabbie/)
13 days ago
The Minimum Total Distance Traveled solution (/articles/minimum-total-distance-traveled/) has been published
There are some robots and factories on the X-axis. You are given an integer array robot where robot[i] is the position of the ith robot. You are also given
a...
14 days ago
The Height of Binary Tree After Subtree Removal Queries solution (/articles/height-of-binary-tree-after-subtree-removal-queries/) has been
published
You are given the root of a binary tree with n nodes. Each node is assigned a unique value from 1 to n. You are also given an array queries...
14 days ago
The Count Square Submatrices with All Ones solution (/articles/count-square-submatrices-with-all-ones/) has been published
Given a m * n matrix of ones and zeros, return how many square submatrices have all ones. Example 1: Input: matrix = [ [0,1,1,1], [1,1,1,1], [0,1,1,1] ]
Output: 15 Explanation: There are 10 squares of...
15 days ago
The Minimum Number of Removals to Make Mountain Array solution (/articles/minimum-number-of-removals-to-make-mountain-array/) has
been published
You may recall that an array arr is a mountain array if and only if: arr.length >= 3 There exists some index i (0-indexed) with 0 < i < arr.length - 1...
16 days ago
The database question Premier League Table Ranking III (/problems/premier-league-table-ranking-iii/) has been published
Table: SeasonStats +------------------+---------+ | Column Name | Type | +------------------+---------+ | season_id | int | |...
16 days ago
Check out our leaderboard (/contest/weekly-contest-419/ranking) for Weekly Contest 419 (/contest/weekly-contest-419)
Top 3 Contestants:
cuy21 (/cuy21/) Dominater069L (/Dominater069L/) Anas_Maged (/Anas_Maged/)
17 days ago
The The Knight’s Tour solution (/articles/the-knights-tour/) has been published
Given two positive integers m and n which are the height and width of a 0-indexed 2D-array board, a pair of positive integers (r, c) which is the starting
position...
17 days ago
Check out our leaderboard (/contest/biweekly-contest-141/ranking) for Biweekly Contest 141 (/contest/biweekly-contest-141)
Top 3 Contestants:
konssept (/konssept/) shankardtu21 (/shankardtu21/) itshivam (/itshivam/)
https://leetcode.com 3/4
10/29/24, 8:41 PM LeetCode - The World's Leading Online Programming Learning Platform
17 days ago
The Split a String Into the Max Number of Unique Substrings solution (/articles/split-a-string-into-the-max-number-of-unique-substrings/) has
been published
Given a string s, return the maximum number of unique substrings that the given string can be split into. You can split string s into any list of non-
empty substrings, where the concatenation of the substrings...
Help Center (/support) Jobs (/jobs) Bug Bounty (/bugbounty) Online Interview (/interview/) Students (/student) Terms (/terms) Privacy Policy (/privacy)
https://leetcode.com 4/4