Review: Array/SubArray Problems Posted on January 25, 2018July 26, 2020 by braindenny Array, a list of numbers. It’s quite normal and natural. See all array tree problems: #array Review: Array/SubArray ProblemsLintCode: Take the element and query the sumLintCode: Swap Two Integers in ArrayLintCode: Sort IntegersLintCode: Radar DetectionLintCode: Max of 3 NumbersLintCode: Generate ArrayList with Given SizeLintCode: Friend RequestLintCode: Coin ProblemLintCode: Calculate Maximum Value IILintCode: Array Maximum ValueLeetCode: Valid Tic-Tac-Toe StateLeetCode: Transpose MatrixLeetCode: The K Weakest Rows in a MatrixLeetCode: The k Strongest Values in an ArrayLeetCode: Summary RangesLeetCode: Sum of Subsequence WidthsLeetCode: Sum of Even Numbers After QueriesLeetCode: Squirrel SimulationLeetCode: Sort ColorsLeetCode: Sort Array By Parity IILeetCode: Single-Row KeyboardLeetCode: Shuffle the ArrayLeetCode: Shortest Word Distance IIILeetCode: Shortest Word DistanceLeetCode: Set MismatchLeetCode: Score After Flipping MatrixLeetCode: Robot Bounded In CircleLeetCode: Remove Palindromic SubsequencesLeetCode: Remove CommentsLeetCode: Reduce Array Size to The HalfLeetCode: Reconstruct a 2-Row Binary MatrixLeetCode: Rearrange Words in a SentenceLeetCode: Rank Transform of an ArrayLeetCode: Projection Area of 3D ShapesLeetCode: Product of Array Except SelfLeetCode: Pour WaterLeetCode: Perform String ShiftsLeetCode: Pascal TriangleLeetCode: Number of Students Doing Homework at a Given TimeLeetCode: Number of Squareful ArraysLeetCode: Number Of Corner RectanglesLeetCode: Non-decreasing ArrayLeetCode: N-Repeated Element in Size 2N ArrayLeetCode: Minimum Value to Get Positive Step by Step SumLeetCode: Minimum Swaps to Make Strings EqualLeetCode: Minimum Subsequence in Non-Increasing OrderLeetCode: Merge Sorted ArrayLeetCode: Maximum SwapLeetCode: Maximum Score After Splitting a StringLeetCode: Maximum Points You Can Obtain from CardsLeetCode: Maximum of Absolute Value ExpressionLeetCode: Maximize Sum Of Array After K NegationsLeetCode: Maximize Distance to Closest PersonLeetCode: Max Increase to Keep City SkylineLeetCode: Max Consecutive Ones IILeetCode: Max Consecutive OnesLeetCode: Make Two Arrays Equal by Reversing Sub-arraysLeetCode: Magic Squares In GridLeetCode: Longest Mountain in ArrayLeetCode: Lonely Pixel IILeetCode: Lonely Pixel ILeetCode: Lemonade ChangeLeetCode: Least Number of Unique Integers after K RemovalsLeetCode: Largest Number At Least Twice of OthersLeetCode: Largest Divisible SubsetLeetCode: Largest 1-Bordered SquareLeetCode: Kids With the Greatest Number of CandiesLeetCode: Island PerimeterLeetCode: Invalid TransactionsLeetCode: Image OverlapLeetCode: High FiveLeetCode: Height CheckerLeetCode: Hand of StraightsLeetCode: H-Index IILeetCode: H-IndexLeetCode: Global and Local InversionsLeetCode: Flower Planting With No AdjacentLeetCode: Flipping an ImageLeetCode: Fixed PointLeetCode: First Missing PositiveLeetCode: Find the Town JudgeLeetCode: Find Peak ElementLeetCode: Find Lucky Integer in an ArrayLeetCode: Find Common CharactersLeetCode: Filter Restaurants by Vegan-Friendly, Price and DistanceLeetCode: Escape The GhostsLeetCode: Duplicate ZerosLeetCode: Distinct Echo SubstringsLeetCode: Distance Between Bus StopsLeetCode: Design Tic-Tac-ToeLeetCode: Design Log Storage SystemLeetCode: Design Browser HistoryLeetCode: Degree of an ArrayLeetCode: Count Negative Numbers in a Sorted MatrixLeetCode: Count Largest GroupLeetCode: Corporate Flight BookingsLeetCode: Consecutive CharactersLeetCode: Compare Strings by Frequency of the Smallest CharacterLeetCode: Check If N and Its Double ExistLeetCode: Check If All 1’s Are at Least Length K Places AwayLeetCode: Check If a Word Occurs As a Prefix of Any Word in a SentenceLeetCode: Check If a Number Is Majority Element in a Sorted ArrayLeetCode: Cells with Odd Values in a MatrixLeetCode: Car FleetLeetCode: Bulb Switcher IILeetCode: Build an Array With Stack OperationsLeetCode: Best Time to Buy and Sell Stock IILeetCode: Best Time to Buy and Sell StockLeetCode: Best Sightseeing PairLeetCode: Beautiful Arrangement IILeetCode: Average Salary Excluding the Minimum and Maximum SalaryLeetCode: Array NestingLeetCode: Arranging CoinsLeetCode: Arithmetic SlicesLeetCode: Alphabet Board PathLeetCode: Advantage ShuffleLeetCode: Add to Array-Form of Integer Num Problem Summary 1 Transpose Matrix LeetCode: Transpose Matrix 2 Largest 1-Bordered Square LeetCode: Largest 1-Bordered Square 3 Alphabet Board Path LeetCode: Alphabet Board Path 4 Set Mismatch LeetCode: Set Mismatch 5 Majority Element LeetCode: Majority Element 6 Two pass for the array Leetcode: Trapping Rain Water 7 Shuffle an Array Leetcode: Shuffle an Array 8 Typically solved by a modified merge sort Count Inversions in an array 9 hashmap vs hashset Leetcode: Check If N and Its Double Exist 10 array + greedy Leetcode: Valid Triangle Number 11 array + three pointer Leetcode: Sort Colors Post Views: 6