LeetCode – 438. Find All Anagrams in a String

LeetCode – 438. Find All Anagrams in a String

Given a string s and a non-empty string p, find all the start indices of p‘s anagrams in s. St…

LeetCode – 434. Number of Segments in a String

LeetCode – 434. Number of Segments in a String

Count the number of segments in a string, where a segment is defined to be a contiguous sequence of …

LeetCode – 412. Fizz Buzz

LeetCode – 412. Fizz Buzz

Write a program that outputs the string representation of numbers from 1 to n. But for multiples of …

LeetCode – 409. Longest Palindrome

LeetCode – 409. Longest Palindrome

Given a string which consists of lowercase or uppercase letters, find the length of the longest pali…

LeetCode – 408. Valid Word Abbreviation

LeetCode – 408. Valid Word Abbreviation

Given a non-empty string s and an abbreviation abbr, return whether the string matches with the give…

LeetCode – 389. Find the Difference

LeetCode – 389. Find the Difference

Given two strings s and t which consist of only lowercase letters. String t is generated by random s…

LeetCode – 383. Ransom Note

LeetCode – 383. Ransom Note

Given an arbitrary ransom note string and another string containing letters from all the magazines, …

LeetCode – 345. Reverse Vowels of a String

LeetCode – 345. Reverse Vowels of a String

Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Gi…

LeetCode –   344. Reverse String

LeetCode – 344. Reverse String

Write a function that takes a string as input and returns the string reversed. Example: Given s = &#…

LeetCode – 293. Flip Game

LeetCode – 293. Flip Game

You are playing the following Flip Game with your friend: Given a string that contains only these tw…

返回顶部