I just cleared. My technical round for the same role. Java developer, java spring boot and micro-services. Day after tomorrow i have managerial round. What salary can i expect? What should i prepare on for my managerial round
Stream to find the second highest distinct number Optional secondHighest = numbers.stream().distinct() // Removeduplicates .sorted(Comparator.reverseOrder()) // Sort in reverse order .skip(1) // Skip the first (highest) number .findFirst(); // Get the second distinct number
We should also put . distinct which removes duplicates because we may have duplicates so the desc sorted stream second elem may also be the first largest.
a small change in your solution: List arrayList2=arrayList.stream().sorted().toList(); Integer secondMax= arrayList2.get(arrayList2.size()-2); these two lines were enough.
She had all things in her tongue..
thanks for sharing :) All the best for your career:)
please suggest some realtime interview of java 8 microservices springboot including aws and kafka
Coding Question
find 2nd largest element
women are scary, she memorized the whole book and ratatatatatata...Damn.
Strictly speaking she has mugged everything.... It's ok to mug after all getting offer is more important
what was the current ctc
and excepted ctc
Thanks for sharing.
Please try to ask code answer also, that would be helpful for freshers.
please tell me important interview question for java springboot developer for infosys
What's the last question for coding? Please provide full code and question
Sorry, just recording was shared with us.
Very very simple questions
I just cleared. My technical round for the same role. Java developer, java spring boot and micro-services. Day after tomorrow i have managerial round. What salary can i expect? What should i prepare on for my managerial round
Congratulations, Can you please share your interview questions and experience.
Could you please share your interview questions?
Total how many rounds are there?
Call me by my name and not by calling me “Sir”! “Basically” is not so basic anymore but rather has become complexed and troublesome.
Stream to find the second highest distinct number
Optional secondHighest = numbers.stream().distinct()
// Removeduplicates
.sorted(Comparator.reverseOrder()) // Sort in reverse order
.skip(1) // Skip the first (highest) number
.findFirst();
// Get the second distinct number
Actually, you did good😁
😆
Wow. She is so good. Who is she?
Thanks.
You're welcome
actually basically ....basically actually 😅😅😅
Basic Questions.
those people who insert "like", "actually", etc. in every sentence they spit out, are very annoying actually 🙃
Arrays.stream(arr1).boxed().sorted(Comparator.reversedOrder).skip(1).findFirst().get();
find second highest number in array
We should also put . distinct which removes duplicates because we may have duplicates so the desc sorted stream second elem may also be the first largest.
Solution to the coding problem:-
List arrayList2=arrayList.stream().sorted().toList();
Integer max= arrayList2.get(arrayList2.size()-1);
arrayList2 = arrayList2.stream().filter(i -> !i.equals(max)).toList();
System.out.println(arrayList2.get(arrayList2.size()-1));
arrayList.stream().filter(o->o!=arrayList.stream().max(Comparator.comparing(Integer::valueOf)).get()).limit(1).forEach(System.out::println);
a small change in your solution:
List arrayList2=arrayList.stream().sorted().toList();
Integer secondMax= arrayList2.get(arrayList2.size()-2);
these two lines were enough.
Interviewer expects logic ...if do like these they don't accept
Voice is not clear
THANKS DADDY
Actually...😂
Atleast Type kar lete bro
Goog interview
She is not good at logical skills