We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1e499e commit 80d81baCopy full SHA for 80d81ba
problem1.java
@@ -0,0 +1,40 @@
1
+/**
2
+Solved by Manikandan, Dept of CSE
3
+*/
4
+
5
+package javaapplication1;
6
+import java.util.*;
7
+public class Main
8
+{
9
+public static void main(String args[])
10
11
+Scanner in=new Scanner(System.in);
12
+String s=in.nextLine();
13
+char a=naresh(s);
14
+System.out.println(a);
15
+}
16
+public static Character naresh(String e)
17
18
+HashMap<Character,Integer> d=new HashMap<Character,Integer>();
19
+int i,j;
20
+Character c;
21
+j=e.length();
22
+for(i=0;i<j;i++)
23
24
+c=e.charAt(i);
25
+if(d.containsKey(c))
26
+d.put(c,d.get(c)+1);
27
+else
28
+d.put(c,1);
29
+ }
30
31
32
33
+if(d.get(c)==1)
34
+return c;
35
36
+return null;
37
38
39
40
0 commit comments