![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构:字符串
fxf1012
这个作者很懒,什么都没留下…
展开
-
《CTCI》1.1 字符串的所有字符是否全部相同
《CITI》1.1 P1081.1 Implement an algorithm to determine if a string has all unique characters. What if you cannot use additional data structures?原创 2015-04-24 19:42:17 · 321 阅读 · 0 评论 -
《CTCI》1.2 反转null结尾的字符串
《CITI》P1091 数组与字符串题目:1.2 Implement a function void reverse (char* str) in Cor C++ which reverses a null-terminated string.原创 2015-04-24 21:23:30 · 351 阅读 · 0 评论 -
《CTCI》1.3 变位词
《CITI》P1091 数组与字符串题目:1.3 Given two strings, write a method to decide if one is a permutation of the other.链接anagram (变位词)原创 2015-04-24 22:11:16 · 261 阅读 · 0 评论 -
《CTCI》1.4 替换字符串中的空格为“%20”
《CITI》P1111 数组与字符串题目:1.4 Write a method to replace all spaces in a string with ‘%20’. You may assume that the string has sufficient space at the end of the string to hold the additional characters, and原创 2015-04-24 22:14:08 · 313 阅读 · 0 评论 -
《CTCI》1.5 字符串“压缩”
《CITI》P1121 数组与字符串题目:1.5 Implement a method to perform basic string compression using the counts of repeated characters. For example, the string aabcccccaaa would become a2blc5a3. If the “compressed” s原创 2015-04-24 22:16:39 · 432 阅读 · 0 评论 -
《剑指Offer》面试题28:字符串的排列
《剑指Offer》 P154面试题28:字符串的排列题目解答//面试题28:字符串的全排列#include <string>#include <iostream>#include <Windows.h>using namespace std;void permutation(string s,int start,int &num){ if (start == s.size() - 1)原创 2015-05-08 16:19:51 · 1474 阅读 · 0 评论 -
LeetCode 3 Longest Substring Without Repeating Characters
LeetCode3 Longest Substring Without Repeating Characters题目Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating let原创 2015-04-30 22:42:28 · 451 阅读 · 0 评论