Showing posts with label being an interviewer. Show all posts
Showing posts with label being an interviewer. Show all posts

Tuesday, April 10, 2018

Being an interviewer: Leetcode 84: Largest rectangle in histogram

April 10, 2018

Introduction


It is my favorite algorithm and it is hard level algorithm in Leetcode.com. I chose this algorithm to interview a friend met on mock interview. He is preparing next week Google onsite, and I gave him another hour mock interview.

I practiced the algorithm recently, but I found out that I still missed something important. The optimal time complexity is O(n), and it has to use stack to save the index of rectangle left boundary when ascending. The stack is always keeps non-descending heights. Here is the link for my past practices.

Learning is fun


The peer is very organized and also very good at explaining the algorithm. I specially like the way he structured the content.

Here is the script for the mock interview.


Sunday, April 1, 2018

How to be a good interviewer?

April 1, 2018

Introduction


I like to do a small research how to be a good interviewer. I learn to be an interviewer by myself, I got a bad feedback when I mock interviewed a person anonymously no video from Singapore with over 6 years experience a few days ago. I gave the algorithm called Leetcode 152: Maximum subarray product. Because I did not want to give all hints out to solve the problem, the interviewee wrote an idea with so buggy code using checking negative elements. At the end of 45 minutes, both of us did not learn anything. The interviewee did not learn anything from the mock interview, I also got bad feedback.

So in order to make mock interview learning experience, I choose to give out all hints and sometimes I make it a tutoring session.

Deletion distance


On March 31, 2018, I gave the peer a mock interview using deletion distance. So I decided to step in and worked on the algorithm together, discussed how to approach the dynamic programming algorithm together.





Saturday, March 24, 2018

Being an interviewer: Leetcode 273: Integer to English words

March 24, 2018

Introduction


I have to say that I am a good JavaScript learner. I spent over 6 month full-time at work to learn JavaScript and then rewrote the JavaScript code for my current job back in 2015. One drill I like to do is to follow the peer when I interview on mock interview platform. On March 22, 2018, I had chance to watch how the peer worked on the algorithm using JavaScript.

It is also good learning experience of JavaScript by observing, and asking questions.

Code review


Here is JavaScript code to pass all kinds of test cases.

A few JavaScript features I like to look into:

Keywords:
Eval, const, $, ``,

I like to give the test case for the peer to work on,
let testNum = 1234567890