GoCalf Calf 的自留地 · 昙花一现

全站内容

Calf

这里收录 Calf 在 GoCalf 上的文章、笔记与其他内容。

  • 664. Strange Printer

    Coding

    #Problem There is a strange printer with the following two special properties: The printer can only print a sequence of the same character each time. At each turn, the printer can print new characters starting from and ending at any place …

    hard
  • 674. Longest Continuous Increasing Subsequence

    Coding

    #Problem Given an unsorted array of integers nums, return the length of the longest continuous increasing subsequence (i.e. subarray). The subsequence must be strictly increasing. A continuous increasing subsequence is defined by two …

    easy
  • 680. Valid Palindrome II

    Coding

    #Problem Given a string s, return true if the s can be palindrome after deleting at most one character from it. https://leetcode.cn/problems/valid-palindrome-ii/ Example 1: Input: s = "aba" Output: true Example 2: Input: s = "abca" Output: …

    easy
  • 684. Redundant Connection

    Coding

    #Problem In this problem, a tree is an undirected graph that is connected and has no cycles. You are given a graph that started as a tree with n nodes labeled from 1 to n, with one additional edge added. The added edge has two different …

    medium
  • 685. Redundant Connection II

    Coding

    #Problem In this problem, a rooted tree is a directed graph such that, there is exactly one node (the root) for which all other nodes are descendants of this node, plus every node has exactly one parent, except for the root node which has …

    hard
  • 688. Knight Probability in Chessboard

    Coding

    #Problem On an n x n chessboard, a knight starts at the cell (row, column) and attempts to make exactly k moves. The rows and columns are 0-indexed, so the top-left cell is (0, 0), and the bottom-right cell is (n - 1, n - 1). A chess knight …

    medium
  • 689. Maximum Sum of 3 Non-Overlapping Subarrays

    Coding

    #Problem Given an integer array nums and an integer k, find three non-overlapping subarrays of length k with maximum sum and return them. Return the result as a list of indices representing the starting position of each interval …

    hard
  • 70. Climbing Stairs

    Coding

    #Problem You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? https://leetcode.com/problems/climbing-stairs/ Example 1: Input: n = …

    easy
  • 714. Best Time to Buy and Sell Stock with Transaction Fee

    Coding

    #Problem You are given an array prices where prices[i] is the price of a given stock on the iᵗʰ day, and an integer fee representing a transaction fee. Find the maximum profit you can achieve. You may complete as many transactions as you …

    medium
  • 72. Edit Distance

    Coding

    #Problem Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three operations permitted on a word: Insert a character Delete a character Replace a character …

    medium