经典算法面试题目-判断s2是否是s1的旋转字符串(1.8)
题目Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is ...
经典算法面试题目-替换字符串的内容(1.5)
题目Write a method to replace all spaces in a string with ‘%20’.写一个函数,把字符串中所有的空格替换为%20 。解答简单题(有2种方法,一种时间耗费大些,一种空间耗费大点,根据需要去选择就好了)第一种方法:(需要一个多余的空间开销-就是多一...
经典算法面试题目-判断两个字符串是否是变位词(1.4)
题目Write a method to decide if two strings are anagrams or not.写一个函数判断两个字符串是否是变位词。解答变位词(anagrams)指的是组成两个单词的字符相同,但位置不同的单词。比如说, abbcd和abcdb就是一对变位词。 也就是说,...
经典算法面试题目-设计算法移除字符串中重复的字符(1.3)
题目Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two additional v...
经典算法面试题目-翻转一个C风格的字符串(1.2)
题目: Write code to reverse a C-Style String. (C-String means that “abcd” is represented as five characters, including the null character.)写代码翻转一个C...
经典算法面试题目-判断一个字符串中的字符是否唯一(1.1)
题目: Implement an algorithm to determine if a string has all unique characters. What if you can not use additional data structures?实现一个算法来判断一个字符串中的字符是...
经典算法面试题目-替换字符串的内容(1.5)
题目 Write a method to replace all spaces in a string with ‘%20’. 写一个函数,把字符串中所有的空格替换为%20 。 解答 简单题(有2种方法,一种时间耗费大些,一种空间耗费大点,根据需要去选择就好了) 第一种方法:(需要一个多余的空间开销...
经典算法面试题目-判断两个字符串是否是变位词(1.4)
题目 Write a method to decide if two strings are anagrams or not. 写一个函数判断两个字符串是否是变位词。 解答 变位词(anagrams)指的是组成两个单词的字符相同,但位置不同的单词。 比如说, abbcd和abcdb就是一对变位词。 ...
本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。
社区圈子