Intuit| SDE2 | India | 2022 [Reject]
Anonymous User
3764

Online Assessment
Some basic questions and one coding question . Most efficient approach of finding whether a LinkedList is palindrome .
Break the linked list into 2 parts . reverse the other part and compare .

Round 1 .

https://leetcode.com/problems/delete-nodes-and-return-forest/

Round 2.

Question was easy . Find the largest substring containing non repeating character .

I implemented it and made a class and kept this function as static .
Tested the code and was working on all test cases .

class LongestSubstring
{
public static int largestNonRepeatingSubstringLength(String s)
{
logic here
}
}

Interviewer told me that you need to make this class have a constructor and pass the input string to the constructor .

I told him that since we have just 1 function in this class and no other variables we dont need to have that approach since that would take unnecessary space in instantiating the object and having an extra string variable in the class . So i can just directly use the classname.function and pass the input string . He did not like this approach for some reason .

After this round i immediately got a rejection mail . Can someone tell me how i was wrong and why interviewer was right .

Comments (6)