Skip to content
the poor coder

Home / Topics / #leetcode

#leetcode

131 posts · page 7 of 7
2021

Leetcode - Richest Customer Wealth Solution

You are given an m x n integer grid accounts where accounts[i][j] is the amount of money the i​​​​​​​​​​​th​​​​ customer has in the j​​​​​​​​​​​th​​​​ bank. Return the wealth that the richest customer has. A customer's…

leetcode1 min read
2021

Leetcode - Running Sum of 1d Array Solution

Given an array nums. We define a running sum of an array as runningSum[i] = sum(nums[0]…nums[i]). Return the running sum of nums. Example 1: Example 2: Example 3: Constraints: 1 <= nums.length <= 1000 -10^6 <= nums[i]…

leetcode1 min read
2021

Leetcode - Shuffle String Solution

Given a string s and an integer array indices of the same length. The string s will be shuffled such that the character at the ith position moves to indices[i] in the shuffled string. Return the shuffled string. Example…

leetcode1 min read
2021

Leetcode - Number of Good Pairs Solution

Given an array of integers nums. A pair (i,j) is called good if nums[i] == nums[j] and i < j. Return the number of good pairs. Example 1: Example 2: Example 3: Constraints: 1 <= nums.length <= 100 1 <= nums[i] <= 100…

leetcode1 min read
2021

Leetcode - Palindrome Number Solution

Given an integer x, return true if x is palindrome integer. An integer is a palindrome when it reads the same backward as forward. For example, 121 is palindrome while 123 is not. Example 1: Example 2: Example 3…

leetcode1 min read
2021

Leetcode - Reverse Integer Solution

Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1], then return 0. Assume the environment does not allow you…

leetcode1 min read
2021

Leetcode - Two Sum - Solution

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same…

leetcode1 min read
ESC