Square Pair Programming Interviews

Looks like Square programming interviews are different compared to usual Leetcode style interviews. I am hoping if someone can throw some light on what kind of preparation I should do for Square pair programming interviews (Java)? - Should I focus on String parsing/regex? - Should I use Interface/Classes when implementing the solution? - Do I have to write the test cases? If so, how can that be done in CoderPad? - What does pair programming mean here? Will interviewer code as well? Thank you! YOE: 3 #square #engineering #software #swe

DocuSign anonymuz9 Nov 8, 2021

So questions asked in square are directly not from leetcode. 100% true, but that doesnt mean you have to prepare anyway differently. They ask you a question. If you are able to answer that, there will be a followup question. Most likely there will be 2 follow-ups in every coding round. Although there could be more but most likely you will run out of time and there is no rule that you have to complete these many follow ups to get a yes from the interviewer. Questions are not difficult or hard . They are more of leetcode easy to medium questions. Do your code, walkthrough your code with a couple of examples and you are good to go

NCR Corporation vordia OP Nov 8, 2021

Thank you for the insight. I am still focusing on practicing Leetcode, however, I have seen folks implementing classes etc in Square interviews.

Square jjabroni Nov 8, 2021

Depends on the question being asked. Some questions lend themselves to OOP and you'll benefit from writing a class.

Salesforce ovJR83 Nov 9, 2021

I just did the pair programming interview today. The problem I got isn't on leetcode, but it was very much in that style. I'd say the difficulty was somewhere between easy and medium, and if you can get through most of the leetcode easy problems without getting stuck then you'll probably do fine. I recommend practicing using CoderPad a bit before the interview. Your code has to actually run and I spent more time than I would have liked hunting down and fixing small typos and syntax errors, which would have been trivial with something like IntelliJ. The only time the interviewer wrote any code was at the very end of the followup question. I had a small error that was causing one test case to fail and he went ahead and fixed it to leave time for questions, but aside from that the code was effectively complete. Also be sure to ask clarifying questions, like whether you need to handle invalid input, etc.

NCR Corporation vordia OP Nov 10, 2021

Thank you for the information. For the follow up questions, did you have to reuse the code you have already written? Did you try to encapsulate stuff in methods for that purpose ?

Salesforce ovJR83 Nov 10, 2021

I may have reused some of the code I had written the first part, but I largely felt like I had the freedom to solve each problem however I wanted. If you have any doubts about something then ask the interviewer for clarification.

Cox Automotive hoolii Nov 10, 2021

Is Square not language agnostic? Can we do the interview in python? Or Java is preferred

NCR Corporation vordia OP Nov 10, 2021

The recruiter asked me the language I prefer so as to match the interviewer who is proficient with the same language. Thus, it is language agnostic.