GoCalf Calf 的自留地 · 昙花一现

全站内容

easy

  • 1260. Shift 2D Grid

    Coding

    #Problem Given a 2D grid of size m x n and an integer k. You need to shift the grid k times. In one shift operation: Element at grid[i][j] moves to grid[i][j + 1]. Element at grid[i][n - 1] moves to grid[i + 1][0]. Element at grid[m - 1][n …

    easy
  • 1374. Generate a String With Characters That Have Odd Counts

    Coding

    #Problem Given an integer n, return a string with n characters such that each character in such string occurs an odd number of times. The returned string must contain only lowercase English letters. If there are multiples valid strings, …

    easy
  • 1437. Check If All 1's Are at Least Length K Places Away

    Coding

    #Problem Given an binary array nums and an integer k, return true if all 1’s are at least k places away from each other, otherwise return false. https://leetcode.com/problems/check-if-all-1s-are-at-least-length-k-places-away/ Example 1: …

    easy
  • 292. Nim Game

    Coding

    #Problem You are playing the following Nim Game with your friend: Initially, there is a heap of stones on the table. You and your friend will alternate taking turns, and you go first. On each turn, the person whose turn it is will remove 1 …

    easy
  • 171. Excel Sheet Column Number

    Coding

    #Problem Given a string columnTitle that represents the column title as appears in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 … Z -> 26 AA -> 27 AB -> 28 … …

    easy
  • 168. Excel Sheet Column Title

    Coding

    #Problem Given an integer columnNumber, return its corresponding column title as it appears in an Excel sheet. For example: A -> 1 B -> 2 C -> 3 … Z -> 26 AA -> 27 AB -> 28 … https://leetcode.com/problems/excel-sheet-column-title/ Example …

    easy
  • 1422. Maximum Score After Splitting a String

    Coding

    #Problem Given a string s of zeros and ones, return the maximum score after splitting the string into two non-empty substrings (i.e. left substring and right substring). The score after splitting a string is the number of zeros in the left …

    easy
  • 3280. Convert Date to Binary

    Coding

    #Problem You are given a string date representing a Gregorian calendar date in the yyyy-mm-dd format. date can be written in its binary representation obtained by converting year, month, and day to their binary representations without any …

    easy
  • 3046. Split the Array

    Coding

    #Problem You are given an integer array nums of even length. You have to split the array into two parts nums1 and nums2 such that: nums1.length == nums2.length == nums.length / 2. nums1 should contain distinct elements. nums2 should also …

    easy
  • 3083. Existence of a Substring in a String and Its Reverse

    Coding

    #Problem Given a string s, find any substring of length 2 which is also present in the reverse of s. A substring is a contiguous sequence of characters within a string. Return true if such a substring exists, and false otherwise. …

    easy