Reverse the words in a sentence, i.e. “My name is Chris” becomes “Chris is name My.” Optimize for speed. Optimize for space.
Category: Uncategorized
Categories
Calculate a substring
Find a substring. Optimize for speed. Optimize for space.
Categories
Compare two strings
Compare two strings using O(n) time with constant space.
- Implement strstr() (or some other string library function).
strlen() Get length of a string. strcpy() Copy one string to another. strcat() Link together (concatenate) two strings. strcmp() Compare two strings. strchr() Find character in string. strstr() Find string in string. strlwr() Convert string to lowercase. strupr() Convert string to uppercase.
Implement an algorithm to do wild card string matching
- Write a function to print all of the permutations of a string.
Categories
Write A to I
- Write a function that takes in a string parameter and checks to see whether or not it is an integer, and if it is then return the integer value
Implement an algorithm to reverse a linked list. Now do it without recursion.
Implement an algorithm to sort a linked list. Why did you pick the method you did? Now do it in O(n) time.
Categories
Build a Singly Linked List
Implement a singly linked list.