GoCalf Calf 的自留地 · 昙花一现

全站内容

medium

  • 57. Insert Interval

    Coding

    #Problem You are given an array of non-overlapping intervals intervals where intervals[i] = [startᵢ, endᵢ] represent the start and the end of the iᵗʰ interval and intervals is sorted in ascending order by startᵢ. You are also given an …

    medium
  • 56. Merge Intervals

    Coding

    #Problem Given an array of intervals where intervals[i] = [startᵢ, endᵢ], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input. …

    medium
  • 55. Jump Game

    Coding

    #Problem You are given an integer array nums. You are initially positioned at the array’s first index, and each element in the array represents your maximum jump length at that position. Return true if you can reach the last index, or false …

    medium
  • 54. Spiral Matrix

    Coding

    #Problem Given an m x n matrix, return all elements of the matrix in spiral order. https://leetcode.com/problems/spiral-matrix/ Example 1: case1Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] Output: [1,2,3,6,9,8,7,4,5] Example 2: case2Input: …

    medium
  • 53. Maximum Subarray

    Coding

    #Problem Given an integer array nums, find the subarray with the largest sum, and return its sum. A subarray is a contiguous non-empty sequence of elements within an array. https://leetcode.com/problems/maximum-subarray/ Example 1: Input: …

    medium
  • 435. Non-overlapping Intervals

    Coding

    #Problem Given an array of intervals intervals where intervals[i] = [startᵢ, endᵢ], return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping. Note that intervals which only touch at a point …

    medium
  • 49. Group Anagrams

    Coding

    #Problem Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, using all the original letters …

    medium
  • 48. Rotate Image

    Coding

    #Problem You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D …

    medium
  • 825. Friends Of Appropriate Ages

    Coding

    #Problem There are n persons on a social media website. You are given an integer array ages where ages[i] is the age of the iᵗʰ person. A Person x will not send a friend request to a person y (x != y) if any of the following conditions is …

    medium
  • 300. Longest Increasing Subsequence

    Coding

    #Problem Given an integer array nums, return the length of the longest strictly increasing subsequence. A subsequence is an array that can be derived from another array by deleting some or no elements without changing the order of the …

    medium hard