Monthly Archives: December 2008

Factorial frequencies

In an attempt to bolster her sagging palm-reading business, Madam Phoenix has decided to offer several numerological treats to her customers. She has been able to convince them that the frequency of occurrence of the digits in the decimal representations … Continue reading

Posted in Information Technology | Leave a comment

Perfection

A perfect number is a positive integer that is equal to the sum of all its positive, proper divisors; for example, 6, which equals 1 + 2 + 3, and 28, which equals 1 + 2 + 4 + 7 … Continue reading

Posted in Information Technology | Leave a comment

Let me count the ways

After making a purchase at a large department store, Mel’s change was 17 cents. He received 1 dime, 1 nickel and 2 pennies. Later that day, he was shopping at a convenience store. Again his change was 17 cents. This … Continue reading

Posted in Information Technology | Leave a comment

Reverse Words

Write a function that reverses the order of the words in a string. For example, your function should transform the string “Do or do not, there is no try.” to “try. no is there not, do or Do”. Assume that … Continue reading

Posted in Information Technology | Leave a comment

Remove Specified Characters

Write an efficient function in C# that deletes characters from a string. Use the prototypeString removeChars ( string str, string remove );Where any characters existing in remove must be deleted from str. For example, given a str of “Battle of … Continue reading

Posted in Information Technology | Leave a comment

Bridge Crossing

A party of four travelers comes to a rickety bridge at night. The bridge can hold the weight of at most two of the travelers at a time, and it cannot be crossed without using a flashlight. The travelers have … Continue reading

Posted in Information Technology | Leave a comment