Randhir
BAN USER
- 0of 0 votes
AnswersList<Integer> list=Arrays.asList(1,2,3,4,5,6);
- Randhir in India
Iterator it=list.iterator();
while(it.hasNext()){
System.out.println(it.next());
}
The above code will iterate sequentially through 1 to 6. Can we iterate the same list alternatively so that it will print 1,3,5 without changing the while loop.| Report Duplicate | Flag | PURGE
Wissen Technology Java Developer Java - 0of 0 votes
AnswerYou are given an array of length N that contains only integer.
- Randhir in United States
A number in this array is called a special number if it is divisible by at least one other number in the array.
Write a program to print the count of special number of array.
Input format :
First Line - N
Second line - N space separated integer.
Output format :
print the count of special number in the array.
constraints
1<= N <= pow(10,5)
Note - divisible with same number will not considered.
Example -
input
N=3
Array= 5 3 10
output
1
Description - 10 is divided by 5,
5 and 3 are not divided by any number| Report Duplicate | Flag | PURGE
RepTaylahMacge, Consultant at Accenture
Assigned to manage the requirements of foreign clients specifically those from the Chinese, Arabic, and French-speaking markets.I am passionate ...
Repjoycejflora, Android Engineer at ABC TECH SUPPORT
I am excited about cooperation and interesting projects. Last year I work for a person who provides the black magic ...
RepMelodyTHeckler, abc at ABC TECH SUPPORT
Earned praised for my work lecturing about get love back by vashikaran. Spent childhood promoting art posters in Jacksonville, FL ...
Repnancyhfloress, Computer Scientist at AMD
Hey there, I’m Nancy. I’m a small business owner living in Sunrise, FL 33323. I am a fan ...
Repsheenaamajors, System Administrator at Achieve Internet
Teach art classes to a diverse array of students of varying ages and abilities. Strong desire to incorporate a multidimensional ...
Repcoragkemmer, Data Scientist at Bankbazaar
Have years of experience to treating variety of outpatients with modalities such as massage, exercise, paraffin, joint mobilization, mechanical traction ...
Repannarrathjen, Employee at 247quickbookshelp
Hello, My name is Anna and I am a medical records technician with 2 years of experience and achievements. I ...
Open Chat in New Window