标签 “string” 下的文章

49. Group Anagrams

Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: [ ["ate", "eat","tea"], ["......

阅读全文 »

LeetCode – 344. Reverse String

Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". 这道题简单到爆了,给两个解,一个是我刚开始做题时候的,......

阅读全文 »