FULLSTACK WEBDevelopment

Job ID: 38226091

Budget: ₹600 – ₹1,500 INR

You have a travel bucket list that contains entries of the best places you want to visit around the world. Each entry consists of a place name and a brief description of why you want to visit that place. Your task is to analyze this list to find out:

The unique places you want to visit.
The total number of characters in the descriptions of all places combined.
A list of place names that are palindromes.

Your travel bucket list has the following format:
Each entry in the list consists of a place name and a description.

Place names are case-sensitive.
Descriptions can contain any characters and are case-sensitive.

Write a function that takes the travel bucket list and returns:
The unique places you want to visit.

The total number of characters in the descriptions.
A list of unique palindrome place names.
Input Format

A string bucketList representing the travel bucket list, where each entry is separated by a newline character. Each entry is in the format "PlaceName: Description" where PlaceName is the name of the place and "Description" is a brief description of why you want to visit that place.

Constraints

Each place name is a non-empty string of up to 50 characters.
Each description is a non-empty string of up to 200 characters.
Output Format

Return an object with three properties:

uniquePlaces: An array of unique place names.
totalDescriptionLength: An integer representing the total number of characters in the descriptions.
palindromePlaces: An array of unique place names that are palindromes.
Sample Input 0

{
"bucketList": "Paris: The city of love and lights.\nMaldives: Beautiful beaches and clear waters.\nRome: The eternal city with a rich history.\nMadam: A quiet town with a unique name."
}
Sample Output 0

{
"uniquePlaces": [
"Paris",
"Maldives",
"Rome",
"Madam"
],
"totalDescriptionLength": 132,
"palindromePlaces": [
"Madam"
]
}
Sample Input 1

{
"bucketList": "Hawaii: Tropical paradise with stunning scenery.\nTokyo: A bustling city with rich culture."
}
Sample Output 1

{
"uniquePlaces": [
"Hawaii",
"Tokyo"
],
"totalDescriptionLength": 74,
"palindromePlaces": []
}
Related categories: React.js Web Development