![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Chapter 1 Arrays and Strings
u011846211
这个作者很懒,什么都没留下…
展开
-
1.1
#include #include using namespace std;bool isUnique1(string s){ bool a[256]; memset(a, 0, sizeof(a)); int len = s.length(); for(int i=0; i<len; ++i) { int v = (int)s[i翻译 2013-08-27 20:12:41 · 508 阅读 · 0 评论 -
1.2
Topic: Implement a function void reverse (char * str) in C or C++ which reverse a null-terminated string. // 关键点翻译 2013-08-28 21:11:54 · 423 阅读 · 0 评论 -
1.3
Topic: Given two strings, write a method to decide if one is a permutation of the other.// 关键点1:Assume it is case sensitive and whitespace is significant. "god "is different from "dog"// 关键翻译 2013-08-28 22:44:33 · 418 阅读 · 0 评论 -
1.4
Topic: 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 that you are giv翻译 2013-08-28 23:53:52 · 380 阅读 · 0 评论 -
1.5
Topic: Implement a method to perform basic string compression using the counts of repeated characters. For example, the string aabccccccaaa would become a2b1c5a3. If the "compressed" string would not翻译 2013-08-30 16:34:16 · 445 阅读 · 0 评论 -
1.6
Topic 1.6 Given an image represented by an N*N matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do this in place?翻译 2013-09-01 04:55:05 · 388 阅读 · 0 评论 -
1.8
Topic: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 a rotation of s1 using only one call to is Sub翻译 2013-09-01 22:36:51 · 476 阅读 · 0 评论