↳
Did well on the first Java coding test. Solution using Hashset. Not so well on the SQL query. Able to give a query, but a few errors in it I am sure. Also there was a second questions regarding the SQL query, which we didn't have time to get to. So that was another bad thing. I am pretty sure I did not pass. But good learning experience. Less
↳
import java.util.*; public class test { public static void main(String[] args) { String str = "abdc"; char[] arr = str.toCharArray(); HashSet set = new HashSet(); for (char i : arr ) { set.add(i); } if((set.size()) == (arr.length)) System.out.println("unique character"); else System.out.println("repetition"); } } Less
↳
No
↳
let string:String = "AAAAABBBVVVCVCAA" let characters = Array(string) var counter:Int = 1 var newArray:[String] = [String]() let lastCount = characters.count - 1 for count in 0...(characters.count - 2) { if characters[count] == characters[count + 1] { counter = counter + 1; }else { newArray.append("\(counter)\(characters[count])") counter = 1 } if lastCount == count + 1 { newArray.append("\(counter)\(characters[count])") } } print(newArray) Less
↳
public static void main(String[] args) { String s = "AAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBCC"; Set set = new HashSet(); char b = 0; int count = 1; String newString = ""; for (int i = 0; i 0) { b = s.charAt(i - 1); } char c = s.charAt(i); if (!set.add(c)) { count++; } else { if (b != 0) { newString = newString + b + count; count = 1; } } } newString = newString + b + count; System.out.println(newString); } Less
↳
public static void main(String[] args) { String s = "AAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBCC"; Set set = new HashSet(); char b = 0; int count = 1; String newString = ""; for (int i = 0; i 0) { b = s.charAt(i - 1); } char c = s.charAt(i); if (!set.add(c)) { count++; } else { if (b != 0) { newString = newString + b + count; count = 1; } } } newString = newString + b + count; System.out.println(newString); } Less
↳
I also had the similar experience here, all other people seem to be normal but this HR was some sick person, so assume that HR policies will be similar here. I am happy to decide that I will not be going here. Less
↳
Thanks for the feedback, to me also HR gave the same dialogue about salary. And I decided to try for some other organization rather such fake company. I also believe the ratings given here 4.6 is fake. Less
↳
It is a company of fraud people, so better to have distance with this company...
↳
Infinispan.
↳
Yes. Mentioned that ehCache. Didn't go into detail.
↳
yes
↳
Ok
↳
I started saying that 'default' keyword is introduced. Now a method can be declared with keyword 'default'. He interrupted me and said there is no keyword called 'default' Less
↳
forEach() method in Iterable interface default and static methods in Interfaces Functional Interfaces and Lambda Expressions Java Stream API for Bulk Data Operations on Collections Java Time API Collection API improvements Concurrency API improvements Java IO improvements Miscellaneous Core API improvements Less
↳
For code reduction problem, he was expecting me to suggest Optional, which I suggested initially but in the end I said that I will never suggest to use Optional here to sacrifice the readability of the code, just to shorten the code. Which I think, he didn't like. Less
↳
This interviewer was expecting me to say 'Optional', which I even said in the start but by the end I suggested not to use Optional here just to reduce the code size & sacrificing the code readability. And that thing also didn't go well. As many kids just mug-up something from internet & start iterating the same everywhere to show their pseudo intelligence & thinking everyone around is fool. Less
↳
Didn't know, however, it's a very edge case, you can insert and the hashcode will be 0, so it's identifying the '0' bucket. Less
↳
HashMap allows null as both key and value, as well. So you can associate a value to null key. However, TreeMap throws a NullPointerException if you try to put a key with null value. Less
↳
I was not able to code for it.
↳
Check Leetcode problem - 42
↳
Many times, if you are asked about open ended questions then can assume that you are not going to be selected, as many times Interviewer will be thinking opposite to your answer or will be expecting more or something else. So chances reduce. Less
↳
Believe it or not, current such Leads or delivery heads are just wasting the time of candidates like they waste money in their projects by just fooling around. Less