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…

LeetCode – 20. Valid Parentheses

LeetCode – 20. Valid Parentheses

Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[‘ and ‘]’, determine if the inpu…

LeetCode – 14. Longest Common Prefix

LeetCode – 14. Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings. 没啥难度,不多说了 pub…

返回顶部