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…

LeetCode –  290. Word Pattern

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

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

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 = &…

LeetCode – 186. Reverse Words in a String II

LeetCode – 186. Reverse Words in a String II

Given an input string, reverse the string word by word. A word is defined as a sequence of non-space…

LeetCode – 189. Rotate Array

LeetCode – 189. Rotate Array

Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array …

LeetCode – 125. Valid Palindrome

LeetCode – 125. Valid Palindrome

Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignori…

LeetCode –  66. Plus One

LeetCode – 66. Plus One

Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. Yo…

LeetCode – 58. Length of Last Word

LeetCode – 58. Length of Last Word

Given a string s consists of upper/lower-case alphabets and empty space characters ‘ ‘, return the l…

返回顶部