leetCode 344. Reverse String 字符串

344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". 思路1: 使用...

leetCode 38. Count and Say 字符串

38. Count and Say The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ... 1 is read off as ...

leetCode 14. Longest Common Prefix 字符串

14. Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. 题目大意:求一组字符串的最长前缀。 代码如下: 1 2 3 4 5 6 7...

leetCode 67. Add Binary 字符串

67. Add Binary Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". 思路: 1.将两个...

leetCode 383. Ransom Note 字符串

383. Ransom Note Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return...

leetCode 125. Valid Palindrome 字符串

125. Valid Palindrome Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man...

[LeetCode] Construct String from Binary Tree 根据二叉树创建字符串

You need to construct a string consists of parenthesis and integers from a binary tree with the preorder traversing way. The null node needs to be rep...

[LeetCode] Design Compressed String Iterator 设计压缩字符串的迭代器

Design and implement a data structure for a compressed string iterator. It should support the following operations: next and hasNext. T...

[LeetCode] Add Bold Tag in String 字符串中增添加粗标签

Given a string s and a list of strings dict, you need to add a closed pair of bold tag <b> and </b> to ...

[LeetCode] Delete Operation for Two Strings 两个字符串的删除操作

Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 the same, where ...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。