Categories
Uncategorized

Given a string containing a sentence reverse the words in a string.

Reverse the words in a sentence, i.e. “My name is Chris” becomes “Chris is name My.” Optimize for speed. Optimize for space.

Categories
Uncategorized

Calculate a substring

Find a substring. Optimize for speed. Optimize for space.

Categories
Uncategorized

Compare two strings

Compare two strings using O(n) time with constant space.
Categories
Uncategorized

Implement the standard string library functions

  • 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.
Categories
Uncategorized

Implement an algorithm to do wild card string matching

Implement an algorithm to do wild card string matching
Categories
Uncategorized

Write a function to print all of the permutations of a string

  • Write a function to print all of the permutations of a string.
Categories
Uncategorized

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
Categories
Uncategorized

Algorithm to reverse a linked list in O(n) time

Implement an algorithm to reverse a linked list. Now do it without recursion.

Categories
Uncategorized

Implement an algorithm to sort a linked list

Implement an algorithm to sort a linked list. Why did you pick the method you did? Now do it in O(n) time.

Categories
Uncategorized

Build a Singly Linked List

Implement a singly linked list.