questions related to data structures

4 views
Skip to first unread message

Neha

unread,
Sep 3, 2010, 10:04:51 AM9/3/10
to Knowledge Test
1) Write a function that counts the number of occurrences of a pair
of letters in a string. For example, the pair “ab” appears twice in
“xabaacbaxabb”.

2) Read a sequence of words from input. Use Quit as a word that
terminates the input. Print the words in the order they were
entered. Don’t print a word twice. Also write a function to sort the
words before printing them.

3) Define a class Interset for a set of integers. Provide union,
intersection, and symmetric difference operations
Reply all
Reply to author
Forward
0 new messages