| |
GeekInterview.com > Interview Questions > Concepts > Data Structures
| Print | |
Question: Data Structure - character that repeats itself
Answer: Given a string of characters (let us say there are about 100 characters or more in the string), what is the most efficient method to use for finding out the character that repeats itself the most?Is it possible for us to use some kind of data structure for this?, if this is so,which is the best one that needs to be used? |
| February 02, 2008 22:08:12 |
#4 |
| Ashish.Shekhar |
Member Since: February 2008 Total Comments: 3 |
RE: Data Structure - character that repeats itself |
| I have an opinion that a hash table with indexing based on the ascii values of the characters would bring the complexity down further and would add some time benefits as well. |
| |
Back To Question | |