- Implement an algorithm to determine if a string has all unique characters. What if you cannot use additional data structures? [C++]
- Implement a function void reverse(char* str) in C or C++ which reverses a null-terminated string. [C++]
- Given two strings, write a method to decide if one is a permutation of the other. [C++]
-
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 given the “true” length of the string. (Note: if implementing in Java, please use a character array so that you can perform this operation in place.)[C++]
EXAMPLE
Input: “Mr John Smith ”
Output: “Mr%20John%20Smith” Continue reading