+ 3

Can anyone help me how can i solve this problem in c++?

Problem link: https://www.sololearn.com/coach/54?ref=app Can Someone give me this problems code in c++? I want to learn it in c++

19th Aug 2021, 6:09 PM
Md Abu Taher
Md Abu Taher - avatar
5 Answers
+ 3
Md Abu Taher Break the problem into smaller problems and solve little problems until the big problem is solved. Step 1 Look at each item in the word. iteration -> for loop or while loop Step 2 Create an empty string, call it a pot. If the item you are looking at is not in the pot, then put it in the pot. if condition & append method += Step 3. Compare the contents of the pot to the original word. if they are the same -> Unique else -> Deja Vu That's it buddy 3 small tasks will solve the big task
19th Aug 2021, 10:54 PM
Rik Wittkopp
Rik Wittkopp - avatar
+ 4
Please show your code!
19th Aug 2021, 6:18 PM
Lisa
Lisa - avatar
+ 3
This will help you if you like it analize: https://code.sololearn.com/c0zKNSmr4k85/?ref=app
19th Aug 2021, 7:18 PM
JaScript
JaScript - avatar
+ 2
Iterate over the string and then use something like unordered map from stl to append the character as key with value 1 in map if only the character isn't stored as key . If the character is stored as key then you can print deja vu and break the loop . Otherwise unique.
19th Aug 2021, 6:39 PM
Abhay
Abhay - avatar
+ 1
Lisa I tried it but it seems hard Then I didn’t write code😮
19th Aug 2021, 6:23 PM
Md Abu Taher
Md Abu Taher - avatar