Overcoming The Whiteboarding Interview Jitters

Tatiana Ensslin
Girl Develop It San Francisco
5 min readApr 16, 2018

Who am I and why did I take Girl Develop It’s Whiteboard Interview Prep?

As an associate software engineer less than a year out of college, I decided it was time to challenge myself and pursue the career which I’d always dreamt about. As a computer engineer, I found myself busy with applied computer science rather than theoretical computer science. Enough admiring from afar! I reckoned it was time to get serious and commit myself to ensuring I knew my foundational computer science theory, which I knew necessary for any tech development job.

I decided to take the class to reinforce my foundational skills and hopefully pick up a trick or two for interviewing in the process. It came as an added benefit that I found myself immersed in a positive and engaging, supportive community, instilling confidence in my abilities to ace any upcoming whiteboard interviews.

What was the goal of Whiteboard Interview Prep?

Whiteboard Interview Prep sought to cover the elements required for a successful whiteboarding interview, including basics of data structures (stacks & queues, linked-lists, trees), Big O notation and recursion.

Since the prep session was an immersive full day into the elements of computer science, we focused the morning on the art of whiteboarding, picking apart the steps of a whiteboard interview, and then practicing these skills with each other with practice interview questions.

After breaking from lunch, we went through data structures, Big O notation for time and space complexity, as well as recursion and its best practices. We then wrapped up the day by taking what we learned throughout the session and applying it to numerous amounts of practice interview problems in partner pairings at the whiteboard!

My favorite part of the workshop — coding!

My favorite part of the workshop was being able to go up to the whiteboard and mock interview some problems. This experience allowed for interesting discussions about solutions to the problems, their complexity, as well as a chance to get comfortable communicating your programming ideas to others who might think about things in a different way. One of my favorite problems to solve was called Nth Node From End.

“Write a function Nth_Node_From_End which takes in the head of a singly Linked-List and a number n, and returns the Nth node from the end of the Linked-List.”

A reason why this problem was my favorite from the workshop was because I was able to discuss the difference between two correct solutions to the problem, and in the end analyze that they were equal in time complexity!

My first solution was to apply a brute force solution: save the head into a temp node, implement a counter to keep track of the length of the list while iterating to the end of the list, and then iterate again through the list from the (length — n), stopping at the nth node from the end and returning the value if it exists.

Brute-force Example - Java 8Node Nth_Node_From_End(head, n){    // base case! The list is empty!    if(head == null){         return null;    }
int length = 0; Node temp = head; // save value of head
// this loop breaks at the end of the linked list
while(head != null){ head = head.next; length++; // increment counter to keep track of length } head = temp; // reset head back to its proper position
// iterate through the list starting @head (temp) until length-n for(int i=0; i <= (length-n); i++){ head = head.next; } return head; // head now contains the nth node from the end!}

After applying the brute force solution, I offered the optimization of a racer pointer (P2) which would follow P1 by n, stopping at the Nth node from the end of the list once P1 had hit the end of the list. This would mean I only need to iterate through the list once, rather than twice as seen above.

After discussing this optimization, I learned that my brute force solution was just as good as my double pointer solution, learning that my pointer solution is what’s called a micro-optimization. In this case, my pointer solution’s run time == o(N) v.s my brute force solution == o(2N). Since in large datasets this difference is nearly negligible, the run time for these two solutions are ultimately the same.

I found this a fun problem to solve that was different than the typical Linked-List problems which ask to insert, remove, or search at different sections of the lists and enjoyed the conversation about the solutions complexity!

My biggest take-away from the class?

My biggest takeaway from the class was the notion that everyone starts at square one when beginning the interview preparation process. It allowed me to understand that anyone who has been successful in the whiteboarding interview process put in the proper time, effort, and practice in ensuring their abilities were sharp, that their mind analyzed the requirements properly, and that their foundational computer science skills were solid.

Some context knowledge I learned at the class came as this one “ah hah!” moment in which I learned that linked-lists were important for noncontiguous memory storage. I had always understood its principles but had seemed to overlook this important added benefit of linked-lists. A visual example is given below for reference!

Linked-Lists utilize noncontiguous memory.

What were my expectations for Whiteboard Interview Prep?

My expectations for the workshop were to reiterate and refresh myself on the skills I learned in college as a sophomore, as well as be able to learn some new skills and tips for interviewing up at the whiteboard. It was important for me to get some time coding on a whiteboard, being naturally anxious to begin the process. Having a community of others in the same, if not similar position as me allowed me the first steps in a supportive and non-judging environment.

Why I’d recommend Girl Develop It SF!

GDISF is an inclusive, supportive community which uplifts and empowers its members to challenge themselves while providing the necessary resources and support for their members to succeed. Furthermore, the teachers I’ve encountered were well experienced, knowledgeable, patient, and engaging — especially in my case where the class was a full day!

Follow me on my journey through tech on LinkedIn and Twitter @tensslin. Interested in Girl Develop It’s workshops? Find a local class or event here and follow them on Twitter @gdisf.

--

--

Tatiana Ensslin
Girl Develop It San Francisco

Loves blockchain engineering, copious amounts of coffee, metacognitive conversations & dancing to Berlin techno. Software Engineer @Zillow