Question 1.3
1 Answer
Question 1.3
| Flag | PURGE
From the book, 4th Edition, exercise #1.3
1.3 Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two additional variables are fine. An extra copy of the array is not.
I copied the code she provided exactly into Eclipse:
I ran the program with input = "HelloHello";
I got output = "Helo";
Does this make any sense?
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
yes, Helo are the only distinct characters in the string and they appear in that order.
- Miguel Oliveira August 08, 2013