GoCalf Calf 的自留地 · 昙花一现

全站内容

easy

  • 3274. Check if Two Chessboard Squares Have the Same Color

    Coding

    #Problem You are given two strings, coordinate1 and coordinate2, representing the coordinates of a square on an 8 x 8 chessboard. Below is the chessboard for reference. problemReturn true if these two squares have the same color and false …

    easy
  • 1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence

    Coding

    #Problem Given a sentence that consists of some words separated by a single space, and a searchWord, check if searchWord is a prefix of any word in sentence. Return the index of the word in sentence (1-indexed) where searchWord is a prefix …

    easy
  • 1346. Check If N and Its Double Exist

    Coding

    #Problem Given an array arr of integers, check if there exist two indices i and j such that : i != j 0 <= i, j < arr.length arr[i] == 2 * arr[j] https://leetcode.com/problems/check-if-n-and-its-double-exist/ Example 1: Input: arr = …

    easy
  • 3232. Find if Digit Game Can Be Won

    Coding

    #Problem You are given an array of positive integers nums. Alice and Bob are playing a game. In the game, Alice can choose either all single-digit numbers or all double-digit numbers from nums, and the rest of the numbers are given to Bob. …

    easy
  • 796. Rotate String

    Coding

    #Problem Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s. A shift on s consists of moving the leftmost character of s to the rightmost position. For example, if s = "abcde", then …

    easy
  • 2490. Circular Sentence

    Coding

    #Problem A sentence is a list of words that are separated by a single space with no leading or trailing spaces. For example, "Hello World", "HELLO", "hello world hello world" are all sentences. Words consist of only uppercase and lowercase …

    easy
  • 1957. Delete Characters to Make Fancy String

    Coding

    #Problem A fancy string is a string where no three consecutive characters are equal. Given a string s, delete the minimum possible number of characters from s to make it fancy. Return the final string after the deletion. It can be shown …

    easy
  • 3222. Find the Winning Player in Coin Game

    Coding

    #Problem You are given two positive integers x and y, denoting the number of coins with values 75 and 10 respectively. Alice and Bob are playing a game. Each turn, starting with Alice, the player must pick up coins with a total value 115. …

    easy
  • 3226. Number of Bit Changes to Make Two Integers Equal

    Coding

    #Problem You are given two positive integers n and k. You can choose any bit in the binary representation of n that is equal to 1 and change it to 0. Return the number of changes needed to make n equal to k. If it is impossible, return -1. …

    easy
  • 2923. Find Champion I

    Coding

    #Problem There are n teams numbered from 0 to n - 1 in a tournament. Given a 0-indexed 2D boolean matrix grid of size n * n. For all i, j that 0 <= i, j <= n - 1 and i != j team i is stronger than team j if grid[i][j] == 1, otherwise, team …

    easy