About 177,000 results
Open links in new tab
  1. Spiral Matrix - LeetCode

    Can you solve this real interview question? Spiral Matrix - Given an m x n matrix, return all elements of the matrix in spiral order.

  2. Spiral Matrix II - LeetCode

    Given a positive integer n, generate an n x n matrix filled with elements from 1 to n 2 in spiral order. Example 1: Input: n = 3 Output: [[1,2,3],[8,9,4],[7,6,5]] Example 2: Input: n = 1 Output: …

  3. Spiral Matrix IV - LeetCode

    Generate an m x n matrix that contains the integers in the linked list presented in spiral order (clockwise), starting from the top-left of the matrix. If there are remaining empty spaces, fill …

  4. Spiral Matrix III - LeetCode

    Spiral Matrix III - You start at the cell (rStart, cStart) of an rows x cols grid facing east. The northwest corner is at the first row and column in the grid, and the southeast corner is at the …

  5. Spiral Matrix II - LeetCode

    Spiral Matrix II - Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order. Example 1: [https://assets.leetcode.com/uploads/2020/11/13/spiraln.jpg] …

  6. Count Triplets That Can Form Two Arrays of Equal XOR - LeetCode

    May 30, 2024 · We are searching for sub-array of length ≥ 2 and we need to split it to 2 non-empty arrays so that the xor of the first array is equal to the xor of the second array. This is …