[SOLVED] A program to remove duplicates from given array of N elemets

26.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

Write JAVA program to –

1. Remove duplicates from given array of N elemets. (Hint Create Hashset and store in it) – as Set automatically removes duplicate.

Example : Input > {3, 5, 2, 2, 5, 6, 7 ,8,3, 5 }
Output > {3, 5, 2, 6, 7 ,8 }

2. Reverse a String.

Example : Input > “Hello world!”
Output > “!dlrow olleH”

3. Reverese words in a string.
Example : Input > “Hello world!”
Output > “world! Hello”

4. Check if entered string is Palindrome or not (a word, phrase, or sequence that reads the same backward as forward)

Example : Input > “madam”
Output > Give string is Palindrome

Example : Input > “sir”
Output > Give string is Not Palindrome

5. Design a stack that supports push, pop, and retrieving the minimum element in constant time O (1).

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.