GoCalf Calf 的自留地 · 昙花一现

全站内容

medium

  • 15. 3Sum

    Coding

    #Problem Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not contain duplicate triplets. …

    medium
  • 139. Word Break

    Coding

    #Problem Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words. Note that the same word in the dictionary may be reused multiple times in the …

    medium
  • 11. Container With Most Water

    Coding

    #Problem You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]). Find two lines that together with the x-axis form a container, such that …

    medium
  • 647. Palindromic Substrings

    Coding

    #Problem Given a string s, return the number of palindromic substrings in it. A string is a palindrome when it reads the same backward as forward. A substring is a contiguous sequence of characters within the string. …

    medium
  • 133. Clone Graph

    Coding

    #Problem Given a reference of a node in a connected undirected graph. Return a deep copy (clone) of the graph. Each node in the graph contains a value (int) and a list (List[Node]) of its neighbors. c++ 复制 class Node { public int val; …

    medium
  • 5. Longest Palindromic Substring

    Coding

    #Problem Given a string s, return the longest palindromic substring in s. A string is palindromic if it reads the same forward and backward. A substring is a contiguous non-empty sequence of characters within a string. …

    medium
  • 540. Single Element in a Sorted Array

    Coding

    #Problem You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once. Return the single element that appears only once. Your solution must run in …

    medium
  • 3. Longest Substring Without Repeating Characters

    Coding

    #Problem Given a string s, find the length of the longest substring without repeating characters. A substring is a contiguous non-empty sequence of characters within a string. …

    medium
  • 128. Longest Consecutive Sequence

    Coding

    #Problem Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must write an algorithm that runs in O(n) time. https://leetcode.com/problems/longest-consecutive-sequence/ Example 1: …

    medium