1st coding round was moderate level in that 2 Java coding question 1 SQL query to find 3rd highest salary
code = swap logic
code = shorted travel path
L2:
class Student {
public int id;
public String name;
public Student(String name, int id) {
this.name = name;
this.id = id;
}
public int hashCode() {
return this.id;
}
public String toString() {
return "Student: " + this.name + "@" + Integer.toHexString(hashCode());
}
public boolean equals(Object o) {
if (o instanceof Student) {
Student s = (Student) o;
return s.id == this.id ? true : false;
}
return false;
}
}
public class UpdateHashSet {
public static void main(String[] args) {
HashSet studentList = new HashSet<>();
Student st1 = new Student("Nimit", 1);
Student st2 = new Student("Rahul", 3);
Student st3 = new Student("Nimit", 2);
studentList.add(st1);
studentList.add(st2);
studentList.add(st3);
System.out.println(studentList.size());
st1.id = 2;
System.out.println(studentList.size());
}
}
Find the output then why, why, why on each counter question
student_id, student_name, student_dob
1, Bob, 2020-01-05
2, Alice, 2020-01-31
How you will process this CSV data, how you will retrieve data between range without DB; exact data structure and its implementation they in very deep how that data structure works not only works it it works like that only kind of internals
Best time to buy and sell stocks; using traditional and Stream API