Hey is there a way to find the maximum occuring character in a string without using a hash map. ?
Maybe in dynamic Programming or something ???
tubby123 -4 Junior Poster in Training
Recommended Answers
Jump to PostDoes it need to be efficient? If O(n2) is acceptable, you could just initialize an int array of the same size, then store the number of following characters that are equal. Then use the index of the largest int value to locate your maximum occurring character.
All 4 Replies
nmaillet 97 Posting Whiz in Training
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
tubby123 -4 Junior Poster in Training
mrnutty 761 Senior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.