926. Flip String Monotone Increasing
Amazon’s - 926. Flip String Monotone Increasing
Amazon’s - 926. Flip String Monotone Increasing
Amazon’s - 279. Perfect Squares
Amazon’s - Max Product Subarray
Amazon’s - Next Greater Element 1
Amazon’s - Next Greater Element 2
Amazon’s - Linked List Cycle Detection
Amazon’s - Find Duplicate Number
Amazon’s - Subarray Sum Equals K
Amazon’s - Range Query 2D
Amazon’s - Range Sum Query
Amazon’s - 2 Sum 2
Amazon’s - Minimum Size Subarray
Amazon’s - Number Of Sub Arrays Of Size K And Average Greater Than Or Equal To Threshold
Amazon’s - Longest Turbulent Subarray
Amazon’s - Max Subarray
Amazon’s - Reverse Bits
Problem Statement in English Approach This is a subset of this problem. Solution in Python class Solution: def hammingWeight(self, n: int) -> int: ans = 0 while n > 0: if n&1 > 0: ans+=1 n = n >> 1 return ans Complexity Time: $O(1)$ Since we only process $32$ bits at most. Space: $O(1)$ Since we only store an integer variable. And we are done.
Amazon’s - Counting Bits
Amazon’s - Shortest Path In Binary Matrix
Amazon’s - Rotting Oranges
Amazon’s - Product Of Array Except Self
Amazon’s - Combination Sum
Amazon’s - Construct Binary Tree
Amazon’s - Kth Smallest Node In BST
Amazon’s - Delete Node in BST
Amazon’s - Climbing Stairs