Thursday, July 5, 2018

863. All Nodes Distance K in Binary Tree

July 5, 2018 I spent 20 minutes to think about the algorithm first, and then plan to read one of discussion article.

Sliding window minimum

July 5, 2018

Introduction


I learn how to give out the mock interview with nice approach. I learned from one of peers giving me feedback, starting from an easy level algorithm and then extending to the hard level algorithm. Let the interviewee warm up on easy level algorithm, and also demonstrate how good he/ she thinks and writes code first. And then it is hard level algorithm if there is need.

I continuously give the same algorithm to people last 5 interviews. I keep coming cross Microsoft programmer or intern from big four companies in the city of Seattle. And also the programmers in the Sillicon Valley. It is easy for me to form a small group for more discussion once a while. I only found one more person to join the small group discussion last one week.

Keep learning


I try to observe myself how I can understand the algorithm by having discussion with different peers. I wrote some hints today. I just keep practice, and work on one thing a time.

Sliding window is most popular algorithm asked in the algorithm interview. It is easy to relate to an array, and also easy to hop on and get some good training on thinking process.

Every time I wrote down some hints.

July 4 10:00 PM - 11:00 PM


July 3, 10:00 PM - 10:50 PM

June 28, 10:00 PM - 10:50 PM

Leetcode spase matrix multilplication group discussion

July 5, 2018

It is our discussion within a group of three people. The time was from 8:30 PM to 10:00 this past Tuesday.

I like to continue to think about this algorithm when I have time. Here is the transcript.


Group discussion

July 5, 2018

Introduction


It is very pleasant to see myself to involve a small group and then we  had good discussion about algorithm together this Tuesday from 8:30 PM to 10:00 PM. This past Tuesday 8:30 PM, we had three people taking turn to discuss one algorithm a time. I had chance to give out an algorithm Jigsaw algorithm and lead the discussion with other two.

Discussion 


I always think about one algorithm last two weeks. I need more challenging thing to do. Last long weekend I worked on seven hard level algorithms. But I still thought about same algorithm again and again. My brain is working this way. So amazing! I better do not waste my energy on the same algorithm. 

Here is the discussion transcript. 

I also like to continue to search and find some interesting to read related to how to design API. 


Actionable Item


It is time for me to do some study about how a person can develop strong interest on algorithm problem solving. 

I used to read mathematics for computer science book. I found that it is very interesting to read. 

How to motivate myself to write 100 lines of code everyday?

July 5, 2018

Introduction


I spent over one hour to write a hard level algorithm called Maximum gap today. I noticed that it is too slow compared to those algorithms I wrote more than 20 times, for example, I can write Sudoku Solver in less than 30 minutes, and I even can remember how many variables I need and how many statements I need to write down, less than 40 lines of code.

I think that I need to train myself to write 100 lines of code against Leetcode online judge every day. There are 128 lines of code for the algorithm Maximum gap including empty line.

If I can write 100 lines of code, and also use Leetcode online judge to train myself to think more carefully about edge cases, I also learn to implement the idea. As a programmer, the most important part is to be able to write perfectly working code in limited time.

Leetcode algorithms


I only submitted Leetcode through online judge for 97 algorithms since 2015. I cannot compete with people with more than 500 algorithm submissions.

Actionable Items


I always think about how to solve jigsaw algorithm recently. One thing I like to do is to ask myself before I write code, can I make my idea more advanced in terms of time complexity, can I scale the problem to millions of row, do I have time out issue or run-out-of-space concern?


Leetcode 864: Random Pick with Blacklist

July 5, 2018

Introduction


It is very good idea to read article related to Leetcode algorithm. The algorithm Leetcode 864 is a hard level algorithm, I had chance to read one of articles.

I will write down something here.

Wednesday, July 4, 2018

Case study: How hard you can train yourself as a software programmer?

July 4, 2018

Introduction


I did study leaderboard of week of code 38 in Canada after the contest last week. I came cross this profile and also his youtube.com channel.

I like to learn from his work. He plays more contest than I do, he also writes a very good blog here.


Tuesday, July 3, 2018

Grigor Dimitrov speaks of his tough first-round loss - Wimbledon 2018

July 3, 2018

Introduction


It is so interesting to watch the interview and I like to learn how to handle the failure. Dimitrov is my favorite tennis sport player.

Good sharing


Stay positive.

4:00/ 11:08 Do not look for excuses.
5:00/ 11:08 Expectation is too high. I could not deal with pressure now. The big pressure is coming from myself.

6:38/ 11:08 Let it sink little bit. I need to calm myself a little bit. Think about rational.

7:57/ 11:08 He is more determined. It is hard for me to accept the losing. It is tough to swallow.

The pigeonhole principle

July 3, 2018

Introduction


It is very popular principle called the pigeonhole principle based on the simple math. I like to study more based on the lecture note written for the maximum gap problem.

The lecture note link is here. And it is also saved on my github.

I like to read the notes carefully and do some research on this pigeonhole principle.


Leetcode 296: Best meeting point

Leetcode 174: dungeon game

Leetcode 164: Maximum gap (Series 1 of 5)

July 3, 2018

Introduction


It is a hard level algorithm called Leetcode 164: Maximum gap. The optimal solution is to use linear time complexity, so the array cannot be sorted using comparison sort. However, if the bucket sort can be applied, and then the array can be sorted using linear time. How do we know the bucket size?

I spent over 20 minutes today to think about the solution. I did think about maximum and minimum value of the array, but what is minimum gap for the array? Can we use the minimum gap to define a bucket? I need those two hints to help me come out the solution.

My practice in 2015


Here are some facts I like to review related to the algorithm.

1. I wrote more than 2 blogs about the algorithm: Leetcode 164: Maximum gap in 2015. Here are the links.
2. I did not submit the code through Leetcode online judge.
I should have submitted the solution.
3. The C# code I wrote could not be found. The gist's link is broken.
4. I spent more than four hours to work on the algorithm in 2015.

My practice in 2018


I plan to write C# code again. It is so exciting to write a hard level algorithm, and understand how important it is to lower down time complexity.

Here is C# code passing online judge.


Monday, July 2, 2018

Job hopping vs Seeking professional development

July 2, 2018

Introduction


It is the long weekend Monday. I stayed at home, and worked on one hard level algorithm, two mock interviews. I had chance to talk to a lead in another country called Spain, and then also I had chat over 15 minutes with a young professional in San Francisco.

The young professional in San Francisco advised me to spend 80% of spare time to work on problem solving skills, as a software programmer, work on algorithm and data structure. You should try to find a good company to allow you to learn advanced frontend technology, but you will be out if your problem solving skills are not so good.

My research topic for the next one or two hours is to understand the article called "Are you job hopping or seeking professional development?". The link is here.

30 minutes study


I like to write down some notes from the article, and I like to understand the ideas as well.

Self-aware  


Statement:
The most effective leaders take the time to develop a practice that enhances self-awareness.

A job-hopping history raises curiosity about whether you know who you are, what you are good at, and where you can make a meaningful contribution.

Smart companies know that self-aware employee are crucial.
  They are better at building relationships with others,
  They are better at managing themselves and creating positive impacts on their environments.
  They often know how to adjust communication to optimize effectiveness.

Experience and curiosity

The trick is to find a balance between curiosity and commitment.

Take the time to think about what you do well and what you enjoy doing most.

Being engaged and productive at work sometimes is the best way for new opportunities to find you.

If you are self-aware, you will notice when these opportunities appear.

My understanding


I do not have psychology degree. This is the first time I read the article and I like to think carefully on those arguments.

The pros and cons of job hopping

July 2, 2018

Introduction


It is a good article to spend 10 minutes to read. The title is called The pros and cons of job hopping.

Pros


Here are the list of pros.

Diverse background.
Access to more information and resources.
Exposure to different businesses and people.
You’ll have a large, resourceful network.
A chance to find the right fit. 
Exposure to different jobs.
An opportunity to show off some of your best attributes.
More money

Cons


Employers will be hesitant to invest in you.
Your job may be less secure
Lack of satisfaction
You may damage relationships
They may question your judgement
They'll fear you'll leave at the first sign of trouble




Here is the truth about how job hopping affects your career

July 2, 2018

Introduction


It is very well written article to read called Here's the truth about how job-hopping affects your career.

10 minutes study


I like to study 10 minutes and then write down a few words, I can look into later.


Career advisor study

July 2, 2018

Introduction


It is time for me to do some study related to career adviser. I came cross this medium article by Larry Cornett.

Eight years on the job celebration

July 2, 2018


Introduction


It is the first time in my career I am able to stay in the same job more than eight years. I just had a great celebration to have a trip to Seattle in June 2018. Also I like to take some short time like 30 minutes or so to study how to manage my career.

How do I spend last eight years? What have I learned as a software programmer?

30 minutes study


Here is one article I plan to spend 10 minutes to read first.

Here is something I like to read first, and then search some keywords in Google.com.

One U.S. boutique firm specializing in IT evaluates candidates on two axes: stability and “performance and capability indicators.” Candidates have to score well on both to be selected for interviews. A consultant at another firm told me that a short stint—less than three years or so—probably wouldn’t be sufficient to produce any meaningful contribution to a firm and thus wouldn’t do much to demonstrate a candidate’s value. Search consultants also tend to interpret frequent moves as a sign of bad decision making, whereas long organizational tenure is rarely seen as reaching a plateau.

A short stint - less than three years or so. 

Search job hopping and then here is another article. 

 “When I see that someone has hopped jobs and gotten increasingly better titles with each new job, it’s a gigantic red flag for me as a hiring manager,” says Souza. “It shows me that they weren’t doing good enough work to get promoted within a single organization, so they had to climb the corporate ladder by continually going somewhere where they have no history.”

Here is the article with a video. 

Leetcode 265: Paint house II

July 2, 2018

Introduction


It is a hard level algorithm called Paint house II. And I like to use this blog to read problem statement.

30 minutes study


Now it is 11:09 AM, I like to spend 30 minutes on the algorithm.

One of ideas is to solve the problem using dynamic programming. At each position of houses, index, it is to get minimum cost to paint each color with color Id.

I notice that greedy algorithm will not work. If every house index the minimum cost is saved without color Id, next time the minimum can not be generated by previous minimum cost. Since we have to compare all colors, the previous one's color id is unknown.

To solve the problem, we have to keep the minimum cost for each index with each color. That is a lot of calculation. Each color ...

I need to get hints to think about simplifying the problem, only keep last two minimum values. Therefore, all colors can be considered for each index position. This is a major hint I need in my thinking process.


Solution study


Here is Chinese version of discussion from the blog:

题解:
是Paint House I的generalized版本。这回颜色不是RGB三种,而是扩展到了K种。正好可以试试在Paint House I中没用上的想法。思路还是使用DP, 这回我们需要维护一个刷当前房子之前所有房子最小的花费min1,以及倒数第二小的花费min2。然后我们再遍历当前房子i所有color的花费,假如这个颜色与之前i-1号房子的颜色相同,我们选择min2,否则选择min1。比较完所有颜色以后我们记录下来当前的curMin1,curMin2以及current color, 更新min1,min2和lastColor,就可以继续计算下一个房子了。
Time Complexity - O(n), Space Complexity - O(1)

Leetcode 262: Trips and users

July 2, 2018

Introduction


It is a hard level algorithm called Trips and Users. Now it is 10:56 AM, I like to spend next 20 minutes to read the problem statement and think about ideas to solve the problem. And then I will spend 10 minutes to find solutions, have a quick study using 10 minutes.

It is my idea to speed up learning process of hard level algorithm. I like to train myself think about hard level algorithms at least 3 of them in a day. One for morning, one for afternoon, one for evening.


Sunday, July 1, 2018

Hard level algorithms - my Canada day

July 1, 2018

Introduction


It is the first time I spent the whole day to go over as much as possible hard level algorithm starting from 11:00 AM to 6:49 PM.

Hard level algorithm


Here are the list. It is not easy to work on hard level algorithms. I did try my best, and focus on getting the ideas first.

Leetcode 97

Leetcode 247 Medium level

Leetcode 248

Leetcode 272

Leetcode 316

Leetcode 327


Actionable Items


It is better to go over hard level algorithm more often, so I can get used to try to solve challenge problem first, sometimes feel good or frustrated. Over the long run, I should feel more confident. It will become part of my daily life. It is like solving Hackerrank contest, I will enjoy the journey.

It is so surprising today I learned another dynamic programming algorithm called interleave string. It is similar to the algorithm called deletion distance.


Leetcode 327: Count of region sum

July 1, 2018

Introduction


It is hard level algorithm called count of region sum. I like to spend 30 minutes on this algorithm first before I go out to play some tennis. I like to spend 20 minutes to read the problem and think about solution first.

Here is the problem statement link.

Now it is 6:28 PM. I spent over 20 minutes to think about it. It may be a dynamic programming solution, and then we try to find all ranges ending at index i, dp[i] stands for the number of ranges in the given range.

Find the solution


It is time for me to find the solution. It is hard for me to come out a complete solution.

It is so exciting to learn something new today.

Here is the idea from one of blogs.

O(n * logn)解法:

解法I 树状数组(Fenwick Tree):
1. 预处理前n项和数组sums

2. 将sums数组离散化(排序+去重)得到数组osums

3. 遍历sums,记sumi = sums[i]
   用二分查找得到[sumi - upper, sumi - lower]的离散化下标[left, right]
   用树状数组统计范围[left, right]内的元素个数,并累加至最终结果ans
   若lower <= sumi <= upper,额外地令ans+1
   将sumi的离散化下标记入树状数组
上述算法将题目转化为下面的问题:
对于数组sums中的每一个元素sumi,统计出现在sumi左侧,并且数值在[sumi - upper, sumi - lower]范围内的元素个数。
这就等价于统计区间和[0, i],[1, i]... [i - 1, i]当中所有落在范围[lower, upper]之内的区间个数。
It is so interesting to read the idea how to solve the algorithm in Chinese. I will do some research and see what I can to solve the algorithm.

解法II 归并排序(Merge Sort):

Leetcode 247: Strobogrammatic Number II

July 1, 2018

Introduction


It is the medium level algorithm. And it is the perfect algorithm to test how to write an elegant recursive solution. It is called strobogrammatic number.

Algorithm study


Here is the blog to provide a recursive solution. I like to write a C# solution as well.


Stroke of Genius: Matina Navratilova

July 1, 2018

I like to play and watch the video a few times called Strokes of Genius: Martina Navratilova Bonus.


Leetcode 248: Strobogrammatic number III

July 1, 2018

Introduction


It is a hard level algorithm called Strobogrammatic  Number III. I like to get into the hard work and spend 30 minutes to work on the algorithm.

I like to read the problem statement and think about using first 20 minutes. Now it is 3:12 PM.

Now it is 3:22 PM. I took some time off. Let me write down something here to help me out, I need to focus on the problem solving.

Problem statement:

A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function to count the total strobogrammatic numbers that exist in the range of low <= num <= high.

For example,
Given low = "50", high = "100", return 3. Because 69, 88, and 96 are three strobogrammatic numbers.


First 20 minutes of thinking 


I think that there are 3 numbers for first the position, 6, 9 or 8, once it is determined, then last digit is also determined. Brute force solution should just try all options and see if it is in the range.

Time complexity is related to how many possible numbers. We only need to return how many numbers, we do not need to return a list of those numbers.

So we should simplify the algorithm by just check every 10 number, 100 numbers, or 1000, etc. how many possible numbers in total. It should speed up calculation.

Solutions


Now it is 3:49 PM. Let me search the solution. It is not easy to figure out the hard level algorithm. I should read II algorithm first, here is the blog.

Now it is 5:04 PM. I just copied the idea from the blog: http://www.cnblogs.com/grandyang/p/5203228.html

这道题是之前那两道 Strobogrammatic Number II 和 Strobogrammatic Number 的拓展,又增加了难度,让我们找到给定范围内的对称数的个数,我们当然不能一个一个的判断是不是对称数,我们也不能直接每个长度调用第二道中的方法,保存所有的对称数,然后再统计个数,这样OJ会提示内存超过允许的范围,所以我们的解法是基于第二道的基础上,不保存所有的结果,而是在递归中直接计数,根据之前的分析,需要初始化 n = 0 和 n = 1 的情况,然后在其基础上进行递归,递归的长度 len从 low到 high之间遍历,然后我们看当前单词长度有没有达到 len,如果达到了,我们首先要去掉开头是0的多位数,然后去掉长度和 low相同但小于 low的数,和长度和 high相同但大于 high的数,然后结果自增 1,然后分别给当前单词左右加上那五对对称数,继续递归调用.




Leetcode 272: Closest binary search tree value II

July 1, 2018

Introduction


It is a hard level algorithm and also relate to binary search tree. I like to work on it using 30 minutes. Now it is 2:12 PM. First 20 minutes to think about a solution, next 10 minutes to study the solution.

Now it is 2:26 PM. I fount that I had experience to work on mock interview algorithm called next largest successor. I already went through the blog and found one with very good discussion about the algorithm. Here is the blog link.

One idea to use two stacks


I just copied the note from the blog to here:

If we do inorder depth-first traverse (left->root->right) of a binary search tree, we can get an ascending sorted list of elements. If we do reverse inorder depth-first traverse (right->root->left) of a binary search tree, we can get a descending sorted list.
So we create two stacks to store. Stack 1 records the ascending sorted list but it terminates before the element which <= target. (line 40). Stack 2 records the descending sorted list but it terminates at the element which < target. (line 42). (You can also make the first inequality with less than, and the second inequality with larger than or equal to. The main point is that the two stacks shouldn’t contain any element at the same time.)
At last you peek at stack 1 and stack 2. You need to pop element into res list from whichever stack has the top element closer to target.

Leetcode 316: Remove duplicate letters

July 1, 2018

Introduction


It is my second hard level algorithm on July 1 2018 Canada day. It is called Remove duplicate letters. I like to work on the algorithm 30 minutes. Now it is 1:39 PM, I like to work until 2:10 PM.

Remove duplicate letters


Now it is 1:50 PM. I am thinking about using stack to store chars and then I can do backtracking to clean up the stack and put the smallest char in the stack first. Of course I can do some calculation first, count the number for each characters.

Now it is 1:52 PM. Let me check the answer.

One of solutions


Here is the blog I read for the solution. It is similar to the sliding window.



Leetcode 97: Interleave string

July 1, 2018it

Introduction


It is a hard level algorithm called interleave string. I have no idea how to learn a hard level algorithm, I just plan to spend 30 minutes time on this algorithm first. Now it is 12:46 PM, I will end the study at 1:16 PM.

Brainstorming ideas


Now it is 1:07 PM. I like to write down what I thought about in last 20 minutes.

Brute force solution - using linear scan from left to right

Check length to see if longest one is the sum of two small ones.
Count how many chars from a - z and see if the sum of each char equals to the sum of interleave string by characters.
Try to think about go from two ends of the interleave string, and find chars from the two strings to match. There is a recurrence formula.


Now it is 1:12 PM. Let me read one of solutions.

One more thinking,
"a"
"a"
"aa"

"ab"
"a"
think about short string first char position in the longer string, there are how many possible position:
length + 1, check prefix and compare to interleave string's prefix to see if there is a match.


Solution 


1:12 PM - 1:22 PM 10 minutes to study.

I just cannot believe that the dynamic programming method is very similar to Deletion distance.


A good thinker

July 1, 2018

Introduction


It is my Sunday morning research topic. And this is Canada day. I like to choose this topic being a good thinker. This past June I had most important experience of onsite in the city of Seattle in my life, I learn most important thing to be a good thinker of algorithm and data structure.

Strategy of practice


I also like to catch up most important training in my practice. Good thinker, be open to all ideas, and also be careful to start from naive and brute force solution, and search for optimal solution.

I like to work on three hard level algorithms to celebrate 2018 Canada day.

My coach used to tell me that there are so many outstanding people in China and then it was so tough for him to get Google job just after graduating from a master degree. I did study one of players on Leetcode, also I followed his ranking on Hackerrank as well.

It is fun to study those player's performance.

https://leetcode.com/maskray/
https://www.linkedin.com/in/yubowenok/  No. 2
https://leetcode.com/contest/     No. 9

https://leetcode.com/cuiaoxiang/
https://www.zhihu.com/people/cuiaoxiang/activities
https://www.zhihu.com/people/maskray/activities

I like to write more code for Leetcode algorithms this year. Also I like to reduce time to play wechat, and write less on wechat.


Being interviewer: Array index and element equality

July 1, 2018

Introduction


It is the binary search algorithm with extra constraint, lowest index. The peer wrote the algorithm with a few bugs but she showed me how good she did reasoning using test cases at top of the code, two test cases, and she always used them to test her code. This is the first time I saw some one to do that. Very smart and I like to learn it as well.

Binary search algorithm 


Here is the algorithm I helped as a reviewer. I did help to fix the bug, add global variable initialization on line 17.

Being interviewee: Regular expression match

July 1, 2018

Introduction


It was my 10:00 PM mock interview on June 30, 2018. It is my favorite algorithm called regular expression matching, and it is hard level. I have not written any new algorithm in the whole week. The peer did such great job to help me go over the tough thinking process to write code in 40 minutes, and a few debugging to pass 4 out of 6 test cases. After the mock interview, the peer shared with me her Google onsite interview experience and Linkedin onsite experience, so generous sharing. I also learned the lesson to keep practicing.

Dynamic programming one more practice


Here is the code I wrote in mock interview 40 minutes.

I mixed the text string and pattern string. On line 41,

Line 41: else if(currentP == '*' && row >= 2 && text[row - 2] != '*')

The above statement row variable checking should be col >= 2 && pattern[col -2] != '*'

Here are a list of things to slow me down in mock interview:

1. Line 25, write down base case for dynamic programming table first row, when the text string is empty, "b*", ".*", "a*b*" should match empty string.

   The expression can be simplified as well.

2. Line 44 missing pattern[col - 2] == '.' for one or more than one case.

Here is the C# code I fixed the bug after the mock interview.

Binary search algorithm mishap

July 1, 2018

Introduction


It is one of three mock interviews I did on June 30, 2018. I made a mistake to write wrong statement to get rid of half of number, and then I spent over ten minutes to try to fix the bug, since the web compiler shows the return of array is empty.

What I can tell


It is so interesting to observe how I reacted this bug and what I did those 10 minutes. After more than 10 times to work on the algorithm, over 50 times binary search algorithm practice last 6 months.

Stay humble. Stay simple. Also be confident on C# class List.ToArray(), understand better about empty array console output.

Here is the C# code I wrote with a bug on binary search algorithm, and then I ended up adding Console.WriteLine based on the peer's advice. So fun to review the mistake. What a mishap!

Practice is fun



Saturday, June 30, 2018

Leetcode 308: Range sum query 2D - Mutable

June 30, 2018

Introduction


It is also a good idea to work on three hard level algorithm a day, one for morning, one for afternoon, one for evening. There are over 150 hard level algorithms, it is a good idea to stay updated with Leetcode.

One idea I got from the peer before is to read the problem statement first, do not look at the answer, let myself to think about the algorithm at least 20 minutes.

Here is the blog related to the algorithm.

Quick study


It is related to binary index tree. I read the blog 10 minutes, and I also plan to read discussion panel for one or two solutions. That is it.

Here is very good link to read from Leetcode discussion. And then I found a good article to read as well.

Island count

June 30, 2018

Introduction


It is my 4:00 PM mock interview. I had to work on the algorithm called Island count. After I explained the algorithm to the peer, peer asked me if I like to continue to write the code for the solution, or I like to discuss with the extended algorithm. I chose to discuss the extended algorithm.

Extended algorithms 


I was asked to work on the extended algorithm. Here is the transcript for our discussion. I need to write code for those two extended algorithms.

Follow up No. 1


Follow up No. 2

Feedback


It is also a good idea to work on the feedback from the peer.



My feedback to the peer


Here is my feedback.


Leetcode 304: Range Sum Query 2D - Immutable

June 30, 2018

Introduction


Plan to read discussion of the algorithm. Here is the link.

Design a function from matrix region sum to jigsaw problem

June 30, 2018

Introduction


It is my most favorite algorithm back in 2015. I had this algorithm exactly same one in 2015. It is called to calculate the subarea sum of matrix.

Here are a few resources.

1. matrix region sum
2. My practice on June 25, 2015, matrix region sum
3. My blog about the algorithm, June 25, 2015. The blog is here. I made a few corrections to make the blog more readable.
4. My blog on April 26, 2016, here is the link.
5. Leetcode 304 - Range Sum query 2D - Immutable


Jigsaw problem 


I recently worked on the design of a jigsaw problem. And also I had discussion with two peers. We tried to identify the problem as a classical algorithm. What is the brute force solution? what can we do better.

I read my solution and I think that it is still a brute force solution. If the function is called a lot of times, we need to reduce the time complexity.

Here is my code written less than a month.

What is the time complexity of my solve function? I put preprocessing function inside the solve function. That is a mistake since it defines time complexity to O(row * row * column * column).

The code was written but time complexity is defined by preprocessing function, which is the bigger one.
The solution I think will be better if I remove the preprocessing and build a dictionary outside the function. We only need to do it once. Therefore the time complexity of solve function can be lowered to O(rows * columns) since it takes O(1) time to get every piece's four neighbors.

Actually the second for loop on line 30 should include all pieces except itself.

Chris Everest

June 30, 2018

Introduction

I start to learn from tennis professional one a time. Chris evert used to be a Wimbledon champion. It is my favorite video, even though it is commercial one. Here is the link.

Friday, June 29, 2018

A quick study - Li na back in 2013 to change coach to get help win second grand slam

June 28, 2018

Introduction


Once a while when I get frustrated, I will start to do some short study on tennis sports. One thing is to find out how the player to replace coach, what are those factors to be considered.

One article 10 minute read


Here is the article I read. I will put down some notes here.

Thursday, June 28, 2018

Let us get it loud - hard level algorithm names

June 28, 2018

Introduction


It is one of Jennifer Lopez's song called "Let us get it loud". I like to play when I try to warm up before I go out to play tennis. I like to use this song to help me to memorize hard level algorithms on Leetcode.com.

Here is all the list of hard algorithms on Leetcode.com.  I just could not believe that I can just read those names over 30 minutes non-stop, and enjoy to read those names.

It is such an interesting study of those hard level algorithm names. They are very well titled and make a short story just using a few words.


Name a few good names of hard level algorithms


One thing  I can do is to list some algorithm names and explain how good the names are. Let me come out a few ideas how to memorize those names, maybe most frequent words in those titles.

I plan to add some notes for each hard level algorithm on Leetcode.com. Here is the pdf file I work on.


Follow up 


Sept. 5, 2018

I started to work on easy level algorithms on Leetcode.com starting from July 10, 2018. There are 190 easy level algorithms for me to work on first.

It is the attitude change. I like to take the advice from my personal coach, and I start to build a good habit to write code every day, busy working on easy level algorithms for a few months.

Once I master the basics, it will not be tough for me to work on hard level algorithms.


Follow up 


May 31, 2019

I came back to revisit those blogs, I tried to find what algorithm I worked with the engineer, since she told me on May 30, 2019 that she joined Facebook. We worked together a lot of hours together, we had some discussion on various topics on algorithm and data structure.

It is much better to work with a coach, so I will not get confused after I failed Amazon onsite in Seattle on June 6, 2018. I just went back to work on more easy level algorithms on Leetcode.com. And later, I got invited from Facebook for a phone screen, I booked the phone screen in the end of July. 

Dijkstra's algorithm study

June 28, 2018

Introduction


It is one of medium algorithm on Hackerrank week of code 38 called "A time-saving affair". I learned from the editorial note that it is related to Dijkstra's algorithm.

I did not have time to look into graph algorithm last Sunday since I ran out of time to play. I just wrote code and then tried to get any point on this algorithm, last hour I score 0 point on the algorithm and tried to improve my algorithm, only two test cases time out. I scored almost full score on the algorithm.


Time to look into timeout issue


I plan to study the algorithm and find out the timeout issue.


How to get motivated to get a gold medal on week of code?

June 28, 2018

Introduction


It is 11:19 PM, and I just finished one hour mock interview with a young graduate from 10:00 PM to 11:00 PM. I like to choose a small topic and conduct 20 minutes study. The topic is how to get motivated to get a gold medal on week of code?

A few thoughts


I can get a gold medal only if I can find time and work a lot of hours for week of code contest on Hackerrank.com. I need to do a lot of research and search related algorithm on leetcode.com for those hard level and advanced level algorithms.

Sometimes I need to learn how to motivate myself to play hard on the contest. Recently I spent a lot of hours to get organized on my past hackerrank contests on github. I did spend some time to go over those contests and tried to review those blogs as well.

It is so enjoyable to play Hackerrank contest and keep improving my performance. I like those long hours hard work. Very good feelings to get involved in problem solving.

Follow up 


July 13, 2018
8:10 PM
I should work on 10 algorithms on Hackerrank Euler before I play next contest. In order to get gold medal, I have to catch up practice on those algorithms with a lot of mathematics. Just a thought.

Try to get two role models from those players on Hackerrank Eulers.



First medal in 2018, Bronze medal

June 28, 2018

Introduction


It is time for me to celebrate small success for week of code 38 bronze medal today. I was waiting for the bronze  medal since this Monday. I did write a blog called tangible goals, I like to achieve small goals first and help me to get back on track.

I should push myself hard and work on the contest last Saturday, so I could have enjoyed the time to solve hard level and expert level algorithm. Every time I have problems to solve the hard level algorithm, I find myself so happy to spend hours to study and try to solve the problem. Even scoring 0 will make me so happy. I just like to learn something new.

Keep good habit


It is good idea to keep good habit and do not give up. It takes time to build up a good habit. It is like sports training, once I have so many good friends on tennis court. It is so easy for me to go out to play tennis.

I have built a few good habits to do things last 18 months. I have weekend day for whole day mock interviews. I have good habit to keep being interviewer last 6 months to be an interviewer.

I need to build a new habit for one weekend day for frontendmaster.com courses, one weekend day for pluralsight.com. Those are two new habits I like to have.

Let us get all facts together


I score 10% of whole 300 points.
I played last day of week of code 38 only.
I got last hour to push myself from bottom 20% to top 25%
Here is the comparison to rank no. 1
Here is the folder to contain all three algorithms I solved

Last Saturday I did not work on the contest, why?
Motivation issues - what to work on? How to motivate myself to get a Gold medal?
Easy level second algorithm, I only scored 30% all possible points I could get

30 minutes to study leadboard of Canada
One profile with Hackerrank solution on youtube.com is here.


Wednesday, June 27, 2018

Leetcode 124: Binary tree maximum path sum

June 27, 2018

Introduction


It is the hard level algorithm and it should be very good exercise for me to work on. I plan to work on it in short future.

My past practice can easily be looked up here.

I like to look into Leetcode discussion and try to get more ideas how to solve the algorithm.

A good friend like me

June 27, 2018

Introduction


It is the first time I like to do a small research on this topic. What is most advantage to be a blogger? I know that I am not the best talent software engineer in the world. But I can tell that two friends are most talent software engineers in the world, I connect both of them through blogging, and then we had discussion on the algorithms. I listened how those two communicated and tried to learn as much as I can.

A good friend like me


How do top two talent people meet? they know me first, and I make connections and set up a meeting together. This is the first meeting. I just could not believe that I did such a fantastic job.

Celebrate with one algorithm


I like to celebrate the friendship using one algorithm called mine sweeper. Here is the transcript. 


Follow up

Aug. 19, 2021
One engineer joined Microsoft, and in less than three years, he is a principal engineer in Microsoft. Another engineer joined Facebook a few years ago. 

I am still enjoying blogging. 


Tuesday, June 26, 2018

Celebrate 52 times as an interviewer

June 26, 2018

Introduction


It is time for me to celebrate my work 10:00 PM as an interviewer, I just finished my 52th interview as an interviewer.

My advice


I had good time to discuss the algorithm with the interviewee today using Leetcode maximum sliding window. It is hard level algorithm.

The interviewee is new master graduate and he asked me what advice I have for him.

Here are the advice I give to him today.

800 Leetcode algorithm, work on hard level 170

   1. try to remember all hard level question names
   2. second try to read all the hard level questions
   3. third try to memorize best time complexity of algorithm


My argument


My argument is based on the fact that those interviewer from Facebook, Amazon, Google are somehow very nice, they just choose one hard level algorithm from 170 Leetcode hard level algorithms. So if you are hard working enough, you may just memorize all of them. You only need to get the idea, and then work hard to figure out the detail in 10 to 20 minutes. 




Monday, June 25, 2018

10 times more efficient programmer

June 25, 2018

Introduction


It is interesting topic how to be 10 times more efficient. I know that in tennis sports, professional tennis player can hit hard and run fast then me at least 3 times. I did go through the stage to learn by myself through youtube video, and I used to allow the tennis racquet hit my head and arm and leg a few times when I played against the wall, and I tried to swing too hard to control of tennis racquet. There is risk to advance skills by just trying.

Just be normal


I think that I can write very readable and clean code. But I have issues to come out ideas how to solve the hard level algorithm. So I have to design drills to help me think hard, think more thorougly.

Good thinking starts from basic exercise. I like to get familiar with those problems and start to remember names first.

Three drills to help me solve hard level algorithms

simple drill 


It is to remember the hard level algorithm name.

It is a new drill for me. What I do is to read each Leetcode hard level algorithm title, and then try to remember those names.


Next drill


I like to read hard level algorithm problem statement one by one. Try to understand the problems first.


Third drill


Start to think about ideas, using one sentence to describe the solution.



Week of code contest 38 was my best therapy

June 25, 2018

Introduction


A coding contest can play an important role to help me enjoy a weekend. I just could not believe that my confidence comes back after the contest.

I like to do a small research to compare last Saturday to last Sunday. I felt that I did better last Sunday, since I committed to the week of code 38 contest, I like to play the contest and win a medal. Actually I tried to get into top 25%.

How does our brain work in order to achieve something? I definitely felt that last Sunday was more enjoyable since I worked on coding from 8:00PM to 11:50 PM more than three hours. Long hours working on an algorithm really brought so much fun to my peaceful life.

I did more than two hours coding in the morning for two easy level algorithms as well. So more than 5 hours coding really brought a lot of joy to my day. I am a software programmer who is calm and with discipline, willing to clean up code and write simple code. I was so proud of myself to be patient to go over the code and do some reasoning, patiently go over debugging process to fix a few bugs in the medium algorithm using Queue, a graph algorithm.

Also miracle happened, last one hour in the contest I fixed the bug of medium algorithm, scored points from zero point a few time to almost full points.

Progress report


I really love to play contest and write algorithm for a medium level algorithm. I wish that I can start early so I have time to work on hard level algorithm in the weekend instead.




C# IEqualityComparer interface

June 25, 2018

Introduction


I cannot believe how busy I am last eight years. I never have chance to read the interface IEqualityComparer and learn how to use it. The C# foundation including ASP.NET is something I have to work hard to learn first, before I apply to work and also maintain the software.

It is the time for me to catch up learning and I like to understand object-oriented design through those C# class. Ask questions and write down here.


C# HashSet class

June 25, 2018

Introduction


It is the algorithm called Sudoku solver, my favorite one. I did have a mock interview on June 23, 2018. I wrote C# solution and came cross the question, do HashSet class have Remove API. I notice that it is time for me to spend time to memorize all APIs of C# HashSet class.

HashSet class


There are so many things to do once I decide to start to memorize HashSet class.

I plan to study IEqualityComparer interface, and then I read HashSet source code.

I will write down all API here. It is important to try to memorize all API first. And then I should come out questions to ask about class design, implementation detail.


Follow up 


7 constructors

HashSet<T>()
HashSet<T>(IEnumerable<T>)
HashSet<T>(IEnumerable<T>, IEqualityComparer<T>)
HashSet<T>(IEqualityComparer<T>)
HashSet<T>(Int32)
HashSet<T>(Inte32, IEqualityComparer<T>)
HashSet<T>(SerializationInfo, StreamingContext)

Properties

Comparer
Count

Methods

Add(T)
Clear()
Contains(T)
CopyTo(T[]) - it is convenient to call - to array is so easy
CopyTo(T[], Int32)  - copies the elements of a HashSet<T> object to an array, starting at the specified array index
CopyTo(T[], Int32, Int32)
Static - CreateSetComparer() - it takes me more than 10 minutes to read - ask why it is static?
Equals(Object)
ExceptWith(IEnumerable<T>) - Removes all elements in the specified collection from the current HashSet<T> object.
Virtual - Finalize() - understand why it is virtural ?

GetEnumerator() - Returns an eneumerator taht iterates through a HashSet<T> object
GetHashCode()-
GetObjectData(SerializationInfo, StreamingContext)
GetType() - Gets the Type of the current instance.
IntersectWith(IEnumerable<T>) - Modifies the current HashSet<t> object ot contain only elements that are present in that object and in the specified collection.
IsProperSubsetOf(IEnumerable<T>) - Determines whether a HashSet<T> object is a proper subset of the specified collection
IsProperSupersetOf(IEnumerable<T>) - supset
IsSubsetOf(IEnumerable<T>)



20 minutes study


Plan to spend 20 minutes quick study of five categories of types

GetType() - Gets the Type of the current instance.
Spend 10 minutes to read the code using GetType()


Classes -> System.Object
Value types -> System.ValueType
Interfaces - System.Object
Enumerations - System.Enum
Delegates -> System.MulticastDelegate


10 minutes to read

IsProperSubsetOf API docuement is here.



Questions asked:

Why CreateSetComparer() is static?
Why Finalize() is virtual?
what is proper subset? subset vs proper subset?

Min to win it - week of code 38

June 25, 2018

Introduction


Life is so busy. It is hard to get into a fight against time out issue in the algorithm problem solving. I know that I have to get more training through hackerrank contest.

I spent over one hour to work on the code. I just could not figure out how to get linear time complexity going and then I decided to move to next algorithm around 3:00 PM this afternoon.

Time out so many test cases


Here is the image to show so many timeout test cases.


Sunday, June 24, 2018

I am back to hard working

June 24, 2018

Introduction 


It is so hard for me to go back to be a hard working programmer. It took me more than three weeks. I spent two days sitting at home the whole weekend, worked inside home office. First day it was Saturday, I did not want to go out, but I did not work on week of code 38 either.

Second day, I told myself to hold on everything just to play week of code 38. I only wrote first two algorithm less than three hours, one friend asked me to mock interview with him. It was maybe 5PM, I had discussion with him until 6:40 PM.

I was so patiently to go back to work on the third algorithm. Now it is 11:47 PM. I only worked on the contest less than 12 hours. Now I finally figured out the third algorithm even though I had to go over discussion panel to read all the discussion to figure out two user cases. I made it from score 0 to full score.

It took me almost one hour to read the problem statement of A time-saving affair, after one hour just thinking about the algorithm, I started to code and try to make any point if I can.

Love is patience 


Since I love algorithm and data structure challenge, I learn to be so patient to myself. I just let myself to enjoy the time to think, time to write code, hold on worry about scoring zero, and read the problem statement and search discussion for tips patiently. I know that the English wording in the problem statement is questionable. I just need ideas to think about the constraint different viewpoints.

I just gave myself enough time and let my brain think and try to write some code, simplify and make it work.

Now I push myself rank to top 25%.

I need to plan ahead and work in weekdays, and allow myself to work on hard level, advanced level and expert level in weekends.

I really enjoyed the time to write around 100 lines of code for the medium level algorithm. Finally I am back to normal, hard working, do not think about anything else.




I should write a medium/ hard level algorithm daily, otherwise I am very easy to get lazy.

Action Items


Julia, you should try to work on hard level and advanced level algorithm after the contest. Try to get out of comfortable zone and start to learn some hard level algorithm.

Follow up


My feelings of working on medium algorithm:

I need to expedite the thinking process. It is too slow. It is just a medium level algorithm.

I could not pass all test cases since timeout on second easy level algorithm.

If I like to pass onsite interview from SDE III, I have to push myself hard when I practice.

In terms of Hackerrank contest, I should be able to solve medium level algorithm without any headache. Those long hours to work on one medium level algorithm is alarm for me, I have to come out a plan to work on something. It should be less than two hours. 15 minutes to think about problem at most, not over one hour.

Replay of the last hour of contest


I finished the code passing the sample test case, but scored 0. I had only less than two hours to the end of contest. Maybe it is one hour only. I tried to push hard to figure out the issue.

I read the problem statement for a few times. And then I started to notice my design issues.

I already made sure that there is no dead loop. I still missed the issue, that is the best time to play contest after long hour. I showed up determined, very careful to scrutinize all possible issues.

I just like to use two graphes to show those kinds of experience are really healthy to train my mental toughness. I think that all the training and good habit to deal with uncertainty helped me in those 20 to 30 minutes to push hard.

I just showed those two images here and then memorized those hard working moments. The thing I could control very well, I should focus on. I start to realize my value of time of one hour in this critical moment. From bottom 15% to top 25% in the one hour.


Onsite interview algorithms

June 24, 2018

Introduction

It is hard to pass phone screen. Once it is onsite, I think that most of people will have no clue to stay there sometimes, even smartest person will fail somehow. I came cross this post to discuss his experience. Here are the type of questions showing onsite.

DFS
BFS
DP,
binary search
sliding window
Topological sort,
two pointers,
bit manipulations,
data structure to implement LRU, LFU, stack/ queue, Trie, Sorting, design a data structure
(

Share one post after a few month break on quora.com

June 24, 2018

Introduction


It took me more than one hour to write a post on quora.com. I like to share something after a few months break. It is not too hard but it is not too easy. I try to make sense on each good thing, I write 10 good things. It is kind of too generic topic, 10 good things. Maybe I should write 3 good things next time, so I can save some time to work on something else.

what are ten good things after playing hackerrank contests?


I put together a question and then write an answer for it with supporting documents, I did add foot notes with more than 8 blogs I wrote before related to contests I played.

Here is the link on quora.com.


Artificial intelligence article

June 24, 2018

Introduction


I try to be a good friend to support those people staying in California and looking for a software engineer job. I also learn something every time a friend chats with me and update me some article to read.

I got an article to read and I like to scan the article and look into a few thing. Here is the article link.


20 minutes study


Luke Zettlemoyer, a professor at the University of Washington

AI Lab called Deep mind.

Study Linkedin profile - Marcelo M De Barros

June 23, 2018

Introduction


I came cross the message since I follow the profile of Linkedin from Microsoft principle group manager Marcelo. It is so inspiring to study the profile with the summary.

I like to make similar presentation like Marcelo does. I believe that he has great taste of art.

My most favorite one is to read his coding blog. The link is here.

Saturday, June 23, 2018

Learn from Naomi Osaka

June 23, 2018

Introduction


I gave myself several hours to study WTA ranking top 100, I did come cross some new faces and then look into a few players. And then I spent over 50 minutes to talk to a friend. And then I decided to study the player Naomi Osaka, how she tries to get into top 20 ranking.

Interviews 


It is fun to watch some interviews. I like to cheer myself up this Saturday. I do not know what to do in terms of study of top 100 ranking.

Here is the video called Naomi Osaka - Roland Garros Tennis Channel Desk visit.

1:11/ 2:40
What do you learn from yourself from victories?
Answer: Kind of surprise.

Plan to read the article called Naomi Osaka is the coolest thing in tennis.
Plan to read the article 10 minutes called

Naomi Osaka success shows tennis can be a better spectacle without seeding

Try to be consistent - Train very hard off the season - paying off - unsatisfied everything I do -
6:00 - train very hard off the season
7:00 -
8:00 -
9:00 - celebrate crazy way is kind of disrespect to the opponent
       
10:00 -
11:00 -
12:00 -
13:00 -
14:00 - 

10 minutes video:
BNP Paribas Open 2018: Naomi Osaka Champion's Press Conference

1:10           lose points depends on nerves (?)
2:09/10:49 psycho myself out, nerve get checked
3:31           ...
4:27           habits? think - more confident will win again
6:00           my goal - more focus each match
8:23           hit harder? ...         

Here is one of videos I like to play a few times.

Follow up

Sept. 8, 2018 6:11 PM

I just could not believe that I just watched Naomi won US open 2018 champion through youtube.com video.

Ten good things about playing hackerrank contests

June 23, 2018

Introduction


It is time for me to write down an eulogy about Hackerrank contest. I spent a lot of time to check in all source code for each hackerrank contest last week, and I just wondered how come I played so many contests through last two years.

It takes me hours to go over those algorithms, blogs. I could not believe that I did write so many algorithms, over 100 algorithms for over 25 contests.

Hackerrank contests



I used to play a lot of hours tennis sports. I know that people will ask me how many hours I have played. 500 hours or 1000 hours. I like to get those hours for Hackerrank contest.

I like to give thanks to Hackerrank and those sponsored companies. I never made it to any of those companies. I try to play for Canada, play for myself, and play for fun.

It is a new life style when I chose to play hackerrank contest one after another one. I could not remember I spent so many weekends to play contests.

Here are some facts:

1. 5 medals, including a gold medal, two silver medals, 2 bronze medals from March to June 2017.
2. A few calls from local software companies first time contacted me from July 2017 to Oct. 2017. 
3. April 2018 I got contact by a company, May I got a phone screen without code screen.
4. I play very well a lot of places. I think that I play Hackerrank, Quora.com, Blogger.com, Code review on stackexchange.com, mock interview platform, also social websites: twitter.com, instagram.com, facebook.com, google+.

Here are my thoughts:

1. I want to be an excellent algorithm and data structure teacher.
2. I want to write code in the weekends. Keep myself busy.
3. I try to bring some topics for my coding blog, contest is really great activity.
4. From April to June, I had more time to play contests since I also play a lot of sports, tennis. 

We got so many platforms to play, somehow I just demonstrated to people that every one can do such a good job if you can work hard continuously over years. I also need to remind myself to work hard, do not give up.

Best thing is to love writing software after those contest experience. I just could not believe that I enjoy so much to write software at work. I could not control to rewrite if I have time, since I have better idea to implement a solution.

10 good things about playing contests


1. No more phone call, chatting.
2. No more shopping around. I try to cut down to minimum.
3. No worry about weather. Stay at home office all the time.
4. Enhance the ability to do research, enjoy exploring new topic of algorithm and data structure.
5. Know more players in the world.
6. New way to meet people, those people loving the competitions.
7. Do not need money to play. Only need free time.
8. Enjoy long hours work, I documented each hour. Work on a check list.
9. Build strong interesting to write code
10. Learn to play with limited time, follow up with code review questions, experience learning through more than 12 months.


  

Byte to byte - Algorithm and data structure problem solving coaching

June 23, 2018

Introduction


I met a young graduate student and we worked together on mock interview algorithms 90 minutes. I worked on Sudoku solver, and he worked on binary search Array index and Element equality. He recommended me to watch Byte to Byte video on youtube.com.

It is such a good conversation with the young graduate, we did talk about a little theory about binary search algorithm, common mistakes, base case, dead loop, and lowest index, recursive function vs iterative solution.

And we talked about more about internship, onsite interviews. I really learn a few things about young graduate  student, a very good engineer and quick to write and work on coding all the time. Compared to him, I am kind of slow to get along with the peer, and not so good to work on a test case, and try to figure out things on the fly, make thing work.

One fact is that I practice binary search last 6 month over 50 times through mock interview, the peer only did once. I did see a lot of issues in the coding part. But I also learn how to judge a person with good thinking process and how to take hint and move forward. I treat the algorithm problem solving likes sports, there is no way to avoid hard work. Embrace it.


Research 


Academic research is such a great topic and I wish that I have time to get into more on a topic.

One video to watch


Here is five minutes called "Increasing your creativity and solve any coding interview problem".

Spend 15 minutes to go over all possible solutions first. We should not go to optimal solution right away.

Take the time to really think and even wild ideas. What sort of things will work, what sort of things will not work.




learn from one engineer - Tan chao

June 23, 2018

Introduction


I read the article on 1acre3land.com, and came cross the name called 覃超.

20 minutes study


Here is the video I watched. 5 minutes video is here. 25 minutes video is here, the topic is things learned in the facebook.

Book to read: Find strengths 2.0

One argument is to work hard, you can do the best.

Every one should find yourself the strong five personalities.

Advice:
Prioritize your tasks
Have your vision
Keep practicing
Watch replay


Reading time - 1point3acres.com

June 23, 2018

Introduction


I understand that I need to catch up a lot of reading. One time my coach showed me how he came out an algorithm for me to work on since he saw a post on 1point3acres.com, so he just changed the phrase. The algorithm is here.

Saturday reading 


Here is the gist I created for the article to talk about software programmer interview and computer science PH.D. program.

A few arguments to think about 


Here are some good arguments to think about from the above article.

Argument 1:

很早之前在B家工作时,就与同事们有一个传统,就是保持市场竞争力的最好方式是出公司面试,看看自己的技能和经验在市场中的价值, 以此判断自己在行业中的位置,是被淘汰还是引领。所以,面试硅谷并不仅仅是为了执行自己的决定,也是一种校正职业方向的方式。

Tennis sports and friendship

June 22, 2018

Introduction


I make a new friend so quickly before I even notice. Last time I went to the tennis court to hit against the wall, the young man next to me told me that he played tennis with me before last year, I have no clue maybe he lied. So I asked him to rally with me on tennis court since I like to run more on the court.

I learn to respect the partner time and also give feedback nicely. I asked him to put more topspin and therefore he can place the tennis ball just before me, one meter away, not running too hard, and show him to put more windshield wipe on the swing. Sometimes I just coach those friends to quickly be my professional hitting partner. He came to the court multiple times a day in the weekend, I told him that I could not come the morning and afternoon because I need to work at home. I need to have 30 minutes workout, run a lot hitting on tennis court.

Old friends also start to like me since I share the tips and show up on tennis courts more often. I am open to stay alone and hit against the wall at the beginning, hunting for hitting partner for next 20 to 30 minutes.

I still remember one advice from the senior player, he told me once there are 12 courts, every five minutes there is change on one of courts. I am just very patient. This can apply to those job seekers on software engineer area as well.

I have done a lot of study on tennis sports, so when a friend told me that she fell on the tennis court, and her partner also fell a few times. He showed me how he fell when he walked backward. I took a few minutes to explain how to run backward using correct foot work [Ref. 1] to prevent falling, expand the center of body weight in-between two legs widely separated.

Today I went to court and started to play against the wall. I was invited to play a double match. I believe that last time I shared the safety tip, they like my advise. After the match, I start to rally against another player.

Friendship


I think about those friendship on tennis court. I play tennis with a lot of people, some of them put a lot of hours on tennis court this season. I need to work on algorithm and contest, I usually cut time to maximum two hours every time. I only show up a few times a week.

We used to spend hundreds of hours together last few years. I cannot spend hundreds of hours on tennis court this summer.

Summer is such great time in the city of Burnaby central park. I need to lose more weight and need to get those friends help me to stay on the court, play harder and run for each tennis ball.

Editorial note:

What happen to those colored sentence?
I wrote the blog first. And then I read again in the second day, I like to make correction. I added some content to make the blog more meaningful. So I highlighted those additional clauses.


References:

1. https://www.optimumtennis.net/tennis-footwork.htm


Friday, June 22, 2018

week of code 38

June 22, 2018

Introduction


It is time for me to work on week of code contest again. I miss those medium level algorithm and those long hours to work on algorithm and try to advance the ranking. I like to dedicate at least more than 8 hours on the contest.

Life can not be that hard. As long as I try to solve hard and advanced level algorithm every week, I will learn something and also fully enjoy the time to work on those algorithms.