Saturday, November 21, 2020

Jee H Sipe: Job Interview Q&A - Live Stream #2

 Here is the link. 

3:12 - How do you start preparing for an interview 8:07 - How to handle cross-functional interviews 9:55 - Product Management interviews at Google 12:41 - What types of questions are asked to Program Managers (not Technical) at Google 14:33 - Why did I get rejected in my phone interview with Google 15:55 - Team match interviews at Google 17:44 - Timing of Recruiter follow up after your interviews have been completed 19:55 - Vendor Manager interview at Google interview tips 22:47 - At what stage of the process does the team match phase happen at Google 24:09 - Treating the interview like a conversation 26:04 - PM 101 Video - https://www.youtube.com/watch?v=RiZRA... 28:21 - Amount of time candidates stay available in the hiring pool after interviewing at Google 30:29 - RRK interview for a Customer Engineer 33:22 - How do you sell/position yourself with no experience 35:16 - Tips for an entry level People Ops interview/s 36:45 - Apple vs Google interviews for Hardware Engineering Program Manager role 39:37 - What happens when a position gets phased out due to COVID 44:25 - Positivity with Virtual Interviews


Jeff H Sipe: Job Interview Q&A - Live Stream #1

 Here is the link. 

2:07 - Is a Test Engineer interview different from a SWE interview 4:05 - How to demonstrate sales skills in an interview 4:21 - What if you only have limited work experience / experience in that type of role 5:38 - Breadth and depth of knowledge in your answers 6:27 - Engineering Manager interviews 8:05 - Experience based questions for a Product Manager 9:24 - Clarifying questions for GCA interview 14:12 - Virtual onsite tips and tricks vs a physical onsite interview 18:04 - Dealing with Ambiguity 19:32 - Engineer vs Architect interview 21:06 - Using online tools vs a whiteboard in a video interview 22:09 - Google's hiring process 25:48 - Google vs Alphabet interviews 27:33 - Google's team fit conversations 30:33 - Sales Operations Analyst interview 32:35 - Making connection requests on LinkedIn 35:21 - Asking for feedback from the interviewer at the end of your interview 37:44 - Going blank during an interview 41:30 - Google's phone interview for an Analyst role 44:01 - What is the most difficult part of Google's GCA interview 47:20 - Will Google continue to do virtual interviews 49:22 - What frameworks should I use 52:18 - Differences between Google's RRK and GCA interviews 54:01 - Does Google put anymore or less weight on any interview 54:55 - After two rejections at Google after final round interviews, can I try again 55:46 - Why I left Google 56:52 - Viewer's personal story of getting hired at Google 57:38 - GHBTRRSSS Framework:


Friday, November 20, 2020

Jeff H Sipe: How to Connect with Your Interviewer

 Nov. 20, 2020

Introduction

It is time for me to learn better about behavior interview. I also need to work on my communications. I think that part of reason I am not so successful is related to my ability to communicate. 

10 minutes video 

Here is the link. 

0:44 - Adaptability 1:49 - Situation 4:28 - Actions 6:18 - Results 8:00 - Learnings 8:33 - Have a Plan 9:16 - Questions 11:21 - Position Specific Other videos referenced as cards in this video: 0:44 - Adaptability - https://www.youtube.com/watch?v=2WdXF... 1:49 - Behavioral Questions - https://www.youtube.com/watch?v=sq3py... 8:00 - STAR + L - https://www.youtube.com/watch?v=CVeFe... 8:33 - Have a Plan - https://www.youtube.com/watch?v=0GgcR... 9:16 - Question Sandwich - https://www.youtube.com/watch?v=xcpvr...


Leetcode discuss: 351. Android Unlock Patterns

C# - Code can be simplified

Nov. 20, 2020
It is challenge for most of people to understand the problem quickly. Also it is important to avoid too much detail in terms of problem solving.

The following solution I studied is to use jumps[][] to determine what is middle number if two positons are not next to each other. It can be simplified to remove the detail of digits in the keyboard.

public class Solution {
        private int[][] jumps;
        private bool[] visited;

        /// <summary>
        /// Nov. 19 2020
        /// study code
        /// https://leetcode.com/problems/android-unlock-patterns/discuss/82464/Simple-and-concise-Java-solution-in-69ms
        /// </summary>
        /// <param name="m"></param>
        /// <param name="n"></param>
        /// <returns></returns>
        public int NumberOfPatterns(int m, int n) {
            const int SIZE = 10;
            jumps = new int[SIZE][];
            for (int i = 0; i < SIZE; i++)
            {
                jumps[i] = new int[SIZE];
            }

            jumps[1][3] = 2;
            jumps[3][1] = 2;

            jumps[4][6] = 5;
            jumps[6][4] = 5;

            jumps[7][9] = 8;
            jumps[9][7] = 8;

            jumps[1][7] = 4;
            jumps[7][1] = 4;

            jumps[2][8] = 5;
            jumps[8][2] = 5;

            jumps[3][9] = 6;
            jumps[9][3] = 6;

            jumps[1][9] = 5;
            jumps[9][1] = 5;
            jumps[3][7] = 5;
            jumps[7][3] = 5;	        

            visited = new bool[10];

            int count = 0;
	        count += runDFS(1, 1, 0, m, n) * 4; // 1, 3, 7, 9 are symmetrical
	        count += runDFS(2, 1, 0, m, n) * 4; // 2, 4, 6, 8 are symmetrical
	        count += runDFS(5, 1, 0, m, n);
	        return count;
        }

        private int runDFS(int num, int len, int count, int m, int n)
        {
            if (len >= m)
            {
                count++; // only count if moves are larger than m
            }

            len++;

            if (len > n)
            {
                return count;
            }

            visited[num] = true;

            for (int next = 1; next <= 9; next++)
            {
                int jump = jumps[num][next];

                // For example, num
                if (!visited[next] && (jump == 0 || visited[jump]))
                {
                    count = runDFS(next, len, count, m, n);
                }
            }

            visited[num] = false; // backtracking
            return count;
        }
}

 

Actionable Items


Better solution is here. 

Leetcode discuss: 351. Android Unlock Patterns

 

C# - DFS - Code study - Simple and working

Nov. 20, 2020
Introduction
It is hard for me to understand the requirement under stress, my mock interview. I like to practice how to rephrase the problem.

Given the range of possible length of pattern, find how many variations to form pattern from 1-9 key screen 3 rows x 3 columns. The challenge is that every move should not cross unvisited digit in key screen.

Case study
1 2 3
4 5 6
7 8 9
example 1: pattern (2, 1, 3) - it is ok. second move, 1->3, 2 is already visited in first move.
example 2: pattern (1, 3, 2) - it is not allowed. First move 1 -> 3, 2 is not visited, so it is not a legal move.

The idea is to go over all possible lengths, and start from (0,0) or (0, 1) or (1, 1). It is true that all other three corners in 3 x 3 matrix is same as (0,0). Next it is true that all other three center node is same as (0, 1).

corner: 1, 3, 7, 9
middle: 2, 4, 6, 8
center: 5

 public class Solution {
    
	/// code study: https://leetcode.com/problems/android-unlock-patterns/discuss/311456/C-DFS-%2B-isValid-with-explanation
    public int NumberOfPatterns(int m, int n) {
         var row = 3;
            var col = 3;

            var minKeys = m;
            var maxKeys = n;

            var visited = new bool[row, col];

            var result = 0;

            // go over pattern - count of keys
            for (int i = minKeys; i <= maxKeys; i++)
            {
                visited[0, 0] = true;
                int topLeft = runDFS(visited, i - 1, 0, 0);
                visited[0, 0] = false;

                visited[0, 1] = true;
                int middleLeft = runDFS(visited, i - 1, 0, 1);
                visited[0, 1] = false;

                visited[1, 1] = true;
                int center = runDFS(visited, i - 1, 1, 1);
                visited[1, 1] = false;

                result += topLeft * 4 + middleLeft * 4 + center;
            }

            return result;
        }

        /// <summary>
        /// depth first search
        /// pattern -> sequence of digits - 
        /// </summary>
        /// <param name="visited"></param>
        /// <param name="stepsLeft">steps to go</param>
        /// <param name="currentRow">horizontal position</param>
        /// <param name="currentCol">vertical position</param>
        /// <returns></returns>
        private int runDFS(bool[,] visited, int stepsLeft, int currentRow, int currentCol)
        {
            if (stepsLeft == 0)
            {
                return 1;
            }

            const int SIZE = 3; 

            var sum = 0;

            for (int nextRow = 0; nextRow < SIZE; nextRow++)
            {
                for (int nextCol = 0; nextCol < SIZE; nextCol++)
                {
                    // one digit only once in a pattern
                    if (visited[nextRow, nextCol])
                    {
                        continue;
                    }

                    if (!IsValid(currentRow, currentCol, nextRow, nextCol, visited))
                    {
                        continue;
                    }

                    visited[nextRow, nextCol] = true;
                    sum += runDFS(visited, stepsLeft - 1, nextRow, nextCol);

                    // backtracking
                    visited[nextRow, nextCol] = false;
                }
            }

            return sum;
        }

        /// <summary>
        /// check valid move - 
        /// determine if the position is visited or not. 
        /// next is to determine if unvisited node is crossed - not allowed.
        /// </summary>
        /// <param name="startRow"></param>
        /// <param name="startCol"></param>
        /// <param name="nextRow"></param>
        /// <param name="nextCol"></param>
        /// <param name="visited"></param>
        /// <returns></returns>
        private bool IsValid(int startRow, int startCol, int nextRow, int nextCol, bool[,] visited)
        {
            var xDistance = Math.Abs(startRow - nextRow);
            var yDistance = Math.Abs(startCol - nextCol);
            
              // same row - one in between
            if ((xDistance == 0 && yDistance == 2 && !visited[startRow, 1]) ||
              // 1st, 3rd row - same column - three cases: column 0, 1, 2
                (xDistance == 2 && yDistance == 0 && !visited[1, startCol]) ||
              // diagonal - (0,0) and (2, 2) -
                (xDistance == 2 && yDistance == 2 && !visited[1, 1]))
            {
                return false;
            }

            return true;
        }
}

Thursday, November 19, 2020

Leetcode discuss: 737. Sentence Similarity II

 Nov. 10, 2020

Introduction

It is important for me to learn a solution shared by Leetcode.com. It is surprising to learn so many things through DFS approach. 

Highlights of DFS solution:

  1. Time complexity is O(N x M), N is the length of words, M is number of pairs.
  2. DFS - not using recursive function, using a stack, and avoid deadloop, use visited HashSet<string>
  3. First using C# hashMap Dictionary<string, List<string>> to build a graph first, go over all pairs and then record undirected graph, A -> B and also B->A
  4. Compared to union find algorithm, DFS is not optimal compared to time complexity. 
  5. Be a good thinker! Read more solutions shared by Leetcode.com solution tab first.  

Here is the gist. 




Wednesday, November 18, 2020

Google Interview Prep Class Facilitated by Outco NTNW

 Here is the link. 

Shortest path

Communication style

Process for problem solving

1. Understand

   a. First example case

    b. Create second example case

    c. Constraints

2. Diagram

3. Code 


Canada oil stock: Big gain day - I missed out the gains

 Nov. 18, 2020

Introduction

It is better for me to stay put, and my loss of August 31, 2020 will recover with only $400 dollar loss. I sold and played with the market, but I could not catch rebound. 

Nov 18, 2020 - gain $1200

I did on purpose to keep original purchase shares using Yahoo -> Finance -> Portfolio. 




Leetcode premium: Finally I paid for one year subscription

 Nov. 18, 2020

Introduction

I just could not believe that my performance on first six set Google mock onsite interview algorithms. I am so happy to work on those algorithms, and I will take some time to record my performance here as well. I like to talk about Leetcode premium. 

I will add more content later. 

Actionable Items

How to be frugal? How to invest on Leetcode premium? Become a partner with leetcode.com. I do not have feeling when portfolio goes up or down over $5000 dollars, but $150/ year for Leetcode.com is hard for me to purchase. 


Monday, November 16, 2020

FAU Combinatorics conference: 1997 to 2020

 陈建敏,vancouver, BC 17:16

还记得97到98年陈晓老师辅导我计算机课程, 那时我刚转计算机系, 提起吴老师研究很多经典算法题目, 一个想法就是一篇好文章。我那时还不懂得刷题很重要。陈晓老师告诉我很多计算机科学领域里事情。那时陈晓老师到好多大公司面试。

Jie Wu 吴杰 17:30

@陈建敏,vancouver, BC 感觉第一次见到你是在数学会议上的一个晚会,是在FAU教授的家。上世纪最有名的数学家Erdos每年参加这个晚会,一直到1997年,你应该见到过。

陈建敏,vancouver, BC 17:57

是的。我还记得那次聚会。刚看了Erdos 故事, 非常感动。

Jie Wu 吴杰 18:15

那时候你还在数学系。还有两位女生一起聊天。

LOU Wei 19:56

不知道FAU的数学年会是否还在继续?当年参加过,觉得数学家们讨论的问题实在有趣

Jie Wu 吴杰 20:00

[index : Florida Atlantic University - Charles E. Schmidt College of Science: http://www.math.fau.edu/combinatorics2019/]

LOU Wei 20:07

我记得这个会是逢双年在FAU开。怎么2019年也在FAU?

Jie Wu 吴杰 20:08

Ronald Graham去年还在。计算机学家Jon Kleinberg也去了

Jie Wu 吴杰 20:09

原来三年两次在FAU一次LSU

Jie Wu 吴杰 20:25

@LOU Wei  2019 大会报告者 K. Brooks Reid 是世界上做 tournament (图论中的锦标赛)最好的。他曾经写过一篇文章证明一个无穷多人的锦标赛有无穷多个King(冠军)。那时问他a sequence of kings问题,他说是新问题。

陈建敏,vancouver, BC 20:40

吴老师对算法研究水平很高! 赶紧点赞。

我在准备十二月谷歌onsite 面试。要刷十五套模拟谷歌现场面试题, 每天刷题。我们需要学习吴老师对科学这份热爱, 培养学生关心大家几十年如一日这份爱心。

Graph theorist: K. B. Reid

 Here is the article. 

Kenneth Brooks Reid, Jr. is a graph theorist and the founder faculty (Head 1989) professor at California State University, San Marcos. He specializes in combinatorial mathematics. He is known for his work in tournaments, frequency partitions and aspects of voting theory. He is known (with E. T. Parker) on a disproof of a conjecture on tournaments by Erdős and Moser

He received his Ph.D. on a dissertation called "Structure in Finite Graphs" from the University of Illinois at Urbana-Champaign in 1968, his advisor was E. T. Parker. Reid is a professor emeritus at Louisiana State University (1968–1989) and has guided students for their Ph.D.s at Baton Rouge.

Selected work[edit]

  • [Book] Disproof of a conjecture of Erdos and Moser on tournaments, KB Reid, ET Parker, ILLINOIS UNIV URBANA - 1964 - oai.dtic.mil
  • Domination graphs of tournaments and digraphs, DC Fisher, JR Lundgren, SK Merz, KB Reid - Congressus Numerantium, 1995 - citeseerx.ist.psu.edu
  • Tournaments, KB Reid, L. W. Beineke - Selected topics in graph theory, 1978


Sunday, November 15, 2020

Case study: Mock interview - 801. Minimum Swaps To Make Sequences Increasing

 The interviewee chose to work on dynamic programming algorithm. She had super good performance, and I like to learn better from her idea. 

Here is the gist. 



Dishwash latch: How to Repair a Dishwasher Door Latch

 Here is the link. 

I need to fix my rental property in Boca Raton the latch of dish washer. 


My mentor: How To Turn A Thrift Store Dresser Into A Bathroom Vanity - AnOregonCottage.com

 I really like the video and also it is so surprising that there is a web page with more detail. I like the approach, similar to mine. 

I wish that I should have started to record videos to post on youtube.com more than 10 years ago. I missed those days I was young and energetic, and I could speak better. 

Today I held a small plastic bag with all four extracted teeth. I can tell from my video that I could speak better if I have those four teeth. 

Here is the link.