Thursday, June 21, 2018

Day four - hard level algorithms

June 25, 2018

It is time for me to read hard level problems 10 algorithms a time. I just could not believe that I will read the problems first, and come back any time if I like to think about more how to solve them.


716
Max Stack    
36.9%Hard
719 27.7%Hard
726 43.4%Hard
727 31.2%Hard
730 35.4%Hard
732 49.6%Hard
736 41.9%Hard
741
Cherry Pickup    
24.1%Hard
745 26.0%Hard
749
Contain Virus    
40.3%Hard

Day three - hard level algorithms

June 25, 2018

It is time for me to read hard level problems 10 algorithms a time. I just could not believe that I will read the problems first, and come back any time if I like to think about more how to solve them.


753 40.8%Hard
757 35.1%Hard
759 53.3%Hard
761 43.5%Hard
765 48.3%Hard
768 43.4%Hard
770 42.5%Hard
772 40.4%Hard
773 46.3%Hard
774 33.0%Hard

Day two - hard level algorithms

June 25, 2018

It is time for me to read hard level problems 10 algorithms a time. I just could not believe that I will read the problems first, and come back any time if I like to think about more how to solve them.

778 44.6%Hard
780 24.0%Hard
782 37.4%Hard
786 32.7%Hard
793 41.8%Hard
798 33.4%Hard
803 22.8%Hard
805 20.4%Hard
810 38.6%Hard
815
Bus Routes    
32.5%Hard

Day one - hard level algorithms

June 25, 2018

It is time for me to read hard level problems 10 algorithms a time. I just could not believe that I will read the problems first, and come back any time if I like to think about more how to solve them.

818
Race Car    
27.2%Hard
827 40.8%Hard
828 33.6%Hard
834 31.5%Hard
839 34.7%Hard
843 33.8%Hard
847 39.6%Hard
850 42.0%Hard
854 29.4%Hard
857 38.4%Hard

A new drill - 10 hard level algorithm on Leetcode every day

June 21, 2018

Introduction


I have to invent some drill to push myself to expose the hard level algorithm on Leetcode.com. One thing I can do is to read 10 hard level algorithm every day, so one week I can finish all hard level algorithms.

I do not need to write code for each hard level algorithm. I just need to read the problem statement, and think about it. That is all.


Goal


My goal is to quickly identify that it is hard level algorithm. When the problem comes out, I can quickly identify it as a familiar problem.

Try to invent something to help myself.


Time to play trick

June 21, 2018

Introduction


As a player to work on data structure and algorithm, I know a lot of issues related to the hard work. I do not get enough social skills when I try to improve coding skills. Sometimes I cannot control my mind very well since I will think about some one unexpected in the past.

A new drill is designed today to train my brain to focus and stay on the ground. One thing I like to do is to memorize all top 50 WTA players, and then choose three of them, do some research how they advance themselves to top 50 ranking.

Here is the ranking web page.

Three players please


I plan to study three players.

Ranking No. 6 Carolina Garcia with her father, coach Louis Paul Garcia


Time to work on github

June 21, 2018

Introduction


It is time for me to be a good and faithful person as a github user, I try to be a writer on github. I can tell a few difference to publish on github compared to publish on blogger.

It is easy to work with other software programmer on projects, source code on github, people are doing that.

When to notice


I notice that cheat sheet is found on github and it is such a nice one. I wrote a blog on data structure cheat sheet on June 14, 2018. I noticed that one of authors is also an engineer from facebook.

How to perform best onsite on algorithm?

June 21, 2018

Introduction


It is true that I have over 300 interviews last 12 months. But in terms of real one, I understand that I only have one this year. How to push myself hard to come out a solution for those 20 minutes?

Think about scalability


It is wise to follow the hackerrank contest format. Set up time limit to 3 seconds, set up upper bound for those given variables, for example, sort a array in two dimension, I can talk about Rows <= 1000, Cols <= 1000, or given 1000,000 instead of 1000. And then I like to target the time complexity based on Rows * Cols, linear or power of 2, preprocessing time for those number, what is space minimum I need. Calculate one in terms of MB. Usually hackerrank space is limited to 300MB.

Try to guess what is limit? Ask and then figure out possible upper bound of time complexity.

I think that will be good start for an onsite and real top one software company.

I stopped playing hackerrank since November 2017. I totally forget those painful and long hours I have worked to try to gain extra few points to scale the problem. I will give one example here later on.

Get organized


Last few days I tried to get organized and checked in past contests into github, I like to review C# code I write before. And then I notice something missing in my daily practice last 8 months. I focus on soft skills, but I lose the desire to scale the algorithm problem.


Follow up 


March 28, 2019

I like to try the idea to work on algorithm problem solving 90 minutes every day. And I like to see how many problems I can solve in one week.

Another thing is to solve all 24 union join algorithm on Leetcode.com first. I need to push myself to learn and work on algorithm daily.

Another thing I can try to do is to get involved in video creating for the algorithm.

Another thing I can try to push myself is to complete another 100 algorithms before June 6, 2019. I like to celebrate one year Amazon onsite with Leetcode solved problems 470 or 500. I think that hard working is most important part of my life.


Hackerrank - practice - problem solving - hard - algorithms

June 21, 2018

Introduction


It is time for me to get organized. I like to check in all my practice on hackerrank.com into github. I did solve 3 hard level algorithms.

Hard level

Matrix layer rotation
Reverse shuffle merge

Medium level


Sherlock and anagrams
Connected Cells in a Grid
Even Tree

Easy level 

Intro to Tutorial Challenges
Pangrams
Funny String
Gemstones
Alternating Characters
The Love-letter mystery
Palindrome index
Anagram
Making angrams
Game of thrones - 1
Two strings
Sherlock and array


It is also a good idea to review the code I wrote 2 years ago. It is so exciting to read the code I wrote two years ago. 

Will come back to write more here. 


Tangible goals

June 21, 2018

Introduction


It is time for me to set up some tangible goals. I like to learn something and also prepare for more challenging things.

Tangible goals


1. Solve a few algorithm and gain 200 points on hackerrank to get a gold badge. I need to get 800 points.

2. Play a contest on hackerrank and try to get a medal.

3. Play some sports and lose 4 lbs in next 30 days.

4. ...

Wednesday, June 20, 2018

Informatics olympiad

June 20, 2018

Introduction


It is a normal day until I come cross the algorithm I worked on before. I was amazed about editorial note, and writer's profile. So I decided to do a small study on the player. The first time I learn how good a informatics olympiad player can be.

Here is the article about hackerrank profile I study today.

My argument


It took me more than 12 months to get my first Gold medal on week of code 33. And then I had hard time to get medal again. It takes me so many hours to work on those algorithms for week of code.

I just could not believe that the algorithm problem solving can be so easy for the informatics olympiad player.

Time to get back on Hackerrank contest

June 20, 2018

Introduction


It is time for me to work on hard level algorithms on hackerrank. I can choose some algorithms I worked on the contest before. I like to get motivated and understand how difficult the algorithm can be in terms of scaling.

I spent half hour to write an algorithm and I just could not believe that I love the algorithm and it can be so easy.

One algorithm a day


This is my algorithm for the day. I wrote some code to figure out how to design API based on given classes and one API.

Here is the transcript. Let us call the algorithm sorting problem in two dimension array.


Bonetrousle

June 20, 2018

Introduction


It is such a great idea to go over all hackerrank contests I played last two years, and review the algorithm. Today I came cross this algorithm called Bonetrousle, I wrote more than hundred lines of code, but score 0. It is time for me to study Editorial note, and then write a correct solution.

Very good suprise


I like the learning from the editorial note. I could not believe that I had chance first time to check code writer's profile. I could not believe that the person has such great performance, and he is ICPC team.

Specially I like the quote he shares on his profile.

Don't beat yourself up, no need to run so fast, sometimes we come last, but we did our best.

It is a medium level algorithm, and it is related to loops. I plan to work on the algorithm again. 

summing pieces - dynamic programming

June 20, 2018

Introduction


Life is not easy for a software programmer.  Since it is hard to master data structure and algorithm. Technology is updating so fast, I try to make my work very easy for me to handle.

I notice that I need to get organize and check in all algorithms I wrote into github. I came cross one algorithm, one editorial note, one hackerrank profile. It inspired me so much.

Here is the algorithm called summing piece. I wrote complicated code in the contest.

Here is the editorial note with some math, my favorite part.

I plan to write a dynamic programming solution for the algorithm.



Linkedin profile update

June 20, 2108

Introduction


It is the first time last 5 years I updated my linkedin profile. I just added some projects to my linkedin profile, and also updated my twitter account.

Projects added


I added a few projects I did last two years, mock interview, code review, hackerrank, quora.com writer.

Here is my linkedin profile for your reference.


Tuesday, June 19, 2018

Leetcode 632: Smallest range

June 19, 2018

Introduction


It is a hard level algorithm called Smallest range. I like to spend 10 - 15 minutes to read the problem statement first.


Monday, June 18, 2018

Leetcode 239: Slide window maximum (series 10 of 10)

Leetcode 239: Slide window maximum (series 9 of 10)

Leetcode 239: Slide window maximum (series 8 of 10)

Leetcode 239: Slide window maximum (series 7 of 10)

Leetcode 239: Slide window maximum (series 6 of 10)

Leetcode 239: Slide window maximum (series 5 of 10)

Leetcode 239: Slide window maximum (series 4 of 10)

June 18, 2018

Introduction


It is time for me to calm down and play with one algorithm with more detail.

Here is the discussion I like to study. And here is the blog I like to read and write down my study notes.

I just quickly copy the statement from the above blog:

Given an array of element a0, a1, a2,..., and queries Q(i, i + L) which means "find the minimum element in ai, ai+1, ai+L". How can we answer such queries efficiently?

We can have an O(nlogn) complexity by using a minimum priority queue, RB tree, or a binary tree representation of multiset, but there in this setting we can implement a data structure called monotonic queue which only requires O(n) in construction. The implementation of this data structure requires a deque.


Leetcode 239: Slide window maximum (series 3 of 10)

June 18, 2018


Introduction


It is time for me to study discussion panel of the algorithm. I chose this one with keywords: Sliding window minimum/maximum = monotonic queue

Here is the discussion link. 


Mock interview talk 


I used the algorithm in my mock interviews a few times last 2 weeks. I had chance to discuss the algorithm with more detail. 

Of course, I like to write down some discussion and help me to develop good thinking process and reasoning skills with the interviewee. 


I did give hint about sliding window, do we have to make the sliding window fixed size? Can we think about the way to reduce the sliding window size? How to approach the problem?



When to add an element into the current sliding window, we can do comparison using current element to the last one in the window. 

Leetcode 239: Slide window maximum (series 2 of 10)

Leetcode 239: Slide window maximum - (series 1 of 10)

June 18, 2018

Introduction


It is hard level algorithm. I like to learn this algorithm starting from June 18, 2018. I like to read at least 10 discussion, and also write code for a few ideas.

Every hard level algorithm takes at least 10 practice for me to master. It is hard level, I like the challenge.


My argument


It is important to stay humble and very cautious. Play at least 3 test cases before I choose one of ideas to solve the problem. It does not matter if there is only five minutes. Most of important is to be curious, and also stay at the moment.


Hackerrank contests

June 18, 2018

Introduction


It is time for me to get organized better for my 20 Hackerrank contest experience. I like to review the algorithm I worked on Hackerrank, and then check in github.

It is time for me to think about more ideas how to get organized, so that I can review some interesting algorithm. I need to get some inspiration from my hard work, and then start all over again.


Github hackerrank Julia


Here is my github hackerrank folder.

Week of code 33 - Gold medal 

So inspiring to read the code I wrote for the contest. I could not believe that I organzied so well and wrote so good C# code in order to play and get Gold medal.

There is no mountain too high to climb. I am determined to work hard, think hard, and write working code to acquire the first gold medal.

Here is the folder to read the source code and get idea how to write C# code as a Gold medal player.



Leetcode last 12 months 42 algorithm submissions

June 18, 2018

Introduction


It feels so good to check in those 42 algorithms I submitted on Leetcode online judge last 12 months. I plan to review what I have worked on and then I find some algorithms to work on again. One of algorithms is Sliding window maximum algorithm. I did not have chance to review the algorithm last 4 weeks, even though I had chance to work on next large element algorithm.

Study once but review once a month. The learning is not one time deal. I need to follow up with more reviews, and also expand my understanding of each algorithm.

Last month I did quickly put together a pdf file to list all algorithm I submitted last 12 months by looking up Leetcode algorithms and then marked algorithms.

Source code on github


Here is the source code folder on my github.


My research topic


I like to choose a small research topic today, now it is 11:34 PM. I like to write down my thoughts right now. I cannot exhaust all hard level algorithm on Leetcode. There is always a new hard level algorithm. Go over those algorithm I work on again, try to explore more on the algorithm.

To train myself, it is better to work on the algorithm with more detail. For example, I can spend over 10 hours to look into Leetcode 239: slide window maximum algorithm, and also blog about my experience and learning.


Sunday, June 17, 2018

Svetlana Kuznetsova

June 17, 2018

Introduction

It is good idea to spend 10 minutes to learn one more tennis player. I like to learn from the player and write down some notes as well.

Take notes

3:00 - 4:00

That is the game. It does not bring me down. Beat myself down.

Can you think that there is best tennis ahead of you?

4:00 - 5:00

When you are over 27 or 28, ...


6:00 - 7:00



7:00 - 8:00

8:00 - 9:00

Cut the hair short since it bothered her to serve on most important match

Garbine Muguruza

June 17, 2018

Introduction


It is 7:17 PM. I am still waiting for myself another 20 minutes to go out to play tennis. I need to do some study about one more player again.

10 minutes video is titled Holding serve with Garbine Muguruza | 2017 US Open.

Taking notes

0:00 - 1:00
0:45 Second is same as the first one?
I felt a different player.

Win/ lose difference?
Consider myself as a fighter. No matter win or lose.

1:00 - 2:00

2:00 - 3:00
Ranking is different. But trophy is feeling different. You can touch it.

3:00 - 4:00
Too nervous. sometimes it does not go my way.

Pressure to feel ...

4:00 - 5:00
Second major?
Keep doing the same things. Tour makes ...


5:00 - 6:00
Took only 4 to 5 days off. Go to gym.

Months to party? No.

6:00 - 7:00

Nobody can tell you the feeling. No coach. It is just you.

7:00 - 8:00


8:00 - 9:00

Change you if you rank number one.
It is harder. Still same person. Do exactly same thing.



9:00 - 10:00

Ask Roger winning 9 times Wimbledon.

I just do not know. I am just talented.

Andrea Petkovic

June 17, 2018

Introduction


It is best time in the year to enjoy long day time day. I usually like to go out to play tennis, but I like to spend extra 20 to 30 minutes to study some players. I like to enjoy the time to watch the interview video.  It is called Holding serve with Andrea Petkovic, 2017 US Open.

Take note


I like to spend 20 minutes on the video, do some research meanwhile playing video twice.

Struggle on motivation 3:30 - 4:45/ 9:43 28 years/ 29 years, ranking drop to 80,

start to play, love it, good at it, make money -> do you really like it? 21 years old still have a lot of options, 28 years old, my time is running out.


5:00 - 6:30 Every one goes through personal. Keep playing tennis, less stress. There is no other place I want to be, rather than playing tennis.

Still has too many ..., explore everything inside me.


One day I can afford it I buy a place over there

June 17, 2018

Introduction


I like to write a blog related to my study about player Caroline Wozniacki. The 10 minutes video is called Holding Serve with Carolina Wozniacki, 2017 US Open.

Here is the video link.

Video watching


It is best time for me to relax, I usually watch three times at least. I enjoy the video better to watch singer or actor/ actress in the Netflix movie.

30 minutes I can do a lot of things. Of course I like to write down some notes from the video.

How the player thinks in terms of friendship with Serena Williams?

Baby aunt, ground rules, ...