Reverse Words in a String While Keeping Positions | Reverse String at same position | Java interview

  Рет қаралды 47

SkillDost

SkillDost

Күн бұрын

Пікірлер: 2
@DanishK-hk2oc
@DanishK-hk2oc 13 күн бұрын
public class UniqueOccurrence { public static void getOccurrence(String input) { char[] ch= input.toCharArray(); Map counter = new HashMap(); for(char c: ch) { counter.put(c, counter.getOrDefault(c, 0)+1); } System.out.println("Print unique character"); for(Map.Entry entry: counter.entrySet()) { if(entry.getValue()==2) { System.out.println(entry.getKey()+"="+entry.getValue()); } } } public static void main(String[]args) { String input="skilldost"; getOccurrence(input); } }
@skilldost
@skilldost 13 күн бұрын
This will not return unique characters my friend
Andro, ELMAN, TONI, MONA - Зари (Official Audio)
2:53
RAAVA MUSIC
Рет қаралды 8 МЛН
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН
Program to Reverse A String in Java by Deepak
9:01
Smart Programming
Рет қаралды 422 М.
HashMaps & Dictionaries, Explained Simply
22:44
Nic Barker
Рет қаралды 15 М.
The Rust Survival Guide
12:34
Let's Get Rusty
Рет қаралды 179 М.
Learn Any Programming Language In 3 Hours!
22:37
Code With Huw
Рет қаралды 640 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
How to solve any Star Pattern Program
18:47
Simply Coding
Рет қаралды 1,2 МЛН