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
what was the current ctc
and excepted ctc
Coding Question
find 2nd largest element
please tell me important interview question for java springboot developer for infosys
Actually, you did good😁
😆
What's the last question for coding? Please provide full code and question
Sorry, just recording was shared with us.
Please try to ask code answer also, that would be helpful for freshers.
Strictly speaking she has mugged everything.... It's ok to mug after all getting offer is more important
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?
Thanks for sharing.
women are scary, she memorized the whole book and ratatatatatata...Damn.
Total how many rounds are there?
Very very simple questions
actually basically ....basically actually 😅😅😅
Call me by my name and not by calling me “Sir”! “Basically” is not so basic anymore but rather has become complexed and troublesome.
Wow. She is so good. Who is she?
Voice is not clear
Actually...😂
those people who insert "like", "actually", etc. in every sentence they spit out, are very annoying actually 🙃
Thanks.
You're welcome
THANKS DADDY
Basic Questions.
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
Atleast Type kar lete bro
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.
Goog interview
She is not good at logical skills
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