leetcode
-
LeetCode – 599. Minimum Index Sum of Two Lists
Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite…
-
LeetCode – 551. Student Attendance Record I
You are given a string representing an attendance record for a student. The record only contains the…
-
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
Count the number of segments in a string, where a segment is defined to be a contiguous sequence of …
-
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
Given a string which consists of lowercase or uppercase letters, find the length of the longest pali…
-
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
Given two strings s and t which consist of only lowercase letters. String t is generated by random s…
-
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
Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Giv…
-
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
You are playing the following Flip Game with your friend: Given a string that contains only these tw…
-
LeetCode – 290. Word Pattern
Given a pattern and a string str, find if str follows the same pattern. Here follow means a full mat…
-
LeetCode – 246. Strobogrammatic Number
A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside …
-
LeetCode – 242. Valid Anagram
Given two strings s and t, write a function to determine if t is an anagram of s. For example,s = &#…