Sort HashMap By Value | Infosys L1 Mock Coding Interview

preview_player
Показать описание
In this video, we covered how to sort the HashMap based on the values.
Infosys Coding Round Java L1. The candidate sorted the hashmap by values and got selected in the company. We show practically how to sort hashmap using values in Java.

Java Interview Questions
Рекомендации по теме
Комментарии
Автор

Good to see this mock interview with the screen shared.
You need to add more questions and answers

rexsam
Автор

Please make more coding questions videos

sanketh
Автор

Hi sir
Can you please make video on
Write a program reverse the only vowels in given string without any affect on consonants

Vithal_Nivargi
Автор

May I know this is for how many years of experience

obireddybandi
Автор

why are you using eclipse instead of vscode or intelliJ?

killerdroid
Автор

Looks like you made the question complex --

We can use like -- sortMap.entrySet().stream().sorted((e1, e2)-> e1.getValue().compare to(e2.get value()).toList()

coincidentIndia
Автор

why is it so lengthy and complicated in java in c# we can simply do:
Dictionary<string, int> result = new Dictionary<string, int>();


result.Add("a", 3);
result.Add("b", 2);
result.Add("c", 1);

foreach (var keys in result)
{
Console.Write($"{keys.Key} => {keys.Value} ");
}

var rrr =result.OrderBy(x => x.Value);
Console.WriteLine();
foreach(var keys in rrr)
{
Console.Write($"{keys.Key} => {keys.Value} ");
}

varunaggarwal
Автор

Same voice Every time 😅. Seem likes fraud

hphp