tare.rohan
BAN USER- -2of 2 votes
AnswersString temp = "A" + "B" + "C" ;
- tare.rohan in India
how many objects are created| Report Duplicate | Flag | PURGE
Developer Program Engineer Java
RepCorrinaAyala, Field Sales at Coupondesh
Corrina, works as a Training and development manager. The Training and Development Manager is responsible for improving the productivity of ...
RepRutviOrtiz, Android Engineer at AMD
I am experienced in teaching other translators through one-on-one mentoring and professional development courses. I am passionate about Unbinding spell ...
Repsheilabjones023, abc at 8x8
Hello,I am a Press operator. I completed my degree from Chicago and now am a Press operator in Lechmere ...
RepAarnaCleark, AT&T Customer service email at ABC TECH SUPPORT
I am a detail-oriented technical manager with exceptional leadership skills and talent for creative marketing. I am an expert producer ...
RepAahnaAllen, AT&T Customer service email at A9
I am a multilingual Judge with 5 years of combined experience in presiding over court proceedings, prosecuting cases, and tirelessly ...
RepjasOlan, Field Sales at Credit Suisse
hi, I am Isom. I am a Security and fire alarm systems installer. I therefore play an important role in ...
RepZairaMoore, Accountant at AMD
I am an ambitious and promising young chef with culinary education and prestigious intern and entry-level work experience. I trained ...
RepNaomiSmith, Integration Software Engineer at ASU
Naomi , a strategic Merchandise Buyer with over 4 years of professional experience in merchandise planning and purchasing positions. Advanced presentation ...
RepEzraDavis, abc at A9
I am a hardworking and disciplined newly-certified architect with internship experience in designing commercial buildings and creating accurate 2D and ...
RepMiguelCortez, Accountant at Apache Design
I am a webmaster and a person responsible for maintaining one or more websites. I spend most of my time ...
RepSusanBrown, Accountant at AMD
I am a resourceful and seasoned Screen Printing Machine Operator with a strong customer service record across a range of ...
Repdorothylopez7485, Analyst at ABC TECH SUPPORT
My name is Dorothy and I am a Host. Nowadays I am doing a new experiment like spell to keep ...
Repmoruytmeks, Airport service agent at Stratabiz
I am an airport service agent . I work in an airport , providing information and assistance to the flying public. In ...
my java solution :
- tare.rohan November 19, 2013import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
class Test1
{
public static void main (String[] args)
{
int[] A1 = {3,5,8,2,4,5,3,6,5};
getFirstUniq(A1);
}
public static void getFirstUniq(int[] A1)
{
if (A1.length>0)
{
LinkedHashMap<Integer, Integer> a1map = new LinkedHashMap<Integer, Integer>();
for (int i = 0 ; i < A1.length ; i++ )
{
if (a1map.containsKey(A1[i]))
{
int value = a1map.get(A1[i]);
a1map.remove(A1[i]);
a1map.put(A1[i],value+1);
}
else
{
a1map.put(A1[i],1);
}
}
Iterator it = a1map.entrySet().iterator();
while(it.hasNext())
{
Map.Entry<Integer, Integer > current = ( Map.Entry)it.next();
if (current.getValue() == 1)
{
System.out.println(current.getKey());
break;
}
}
}
}
}