Sunday, September 23, 2018

28. Implement strStr()

Sept 23, 2018

Introduction


It is time for me to review the algorithm. I like to spend time to read the discuss. I wrote the first submission more than three years ago.




Confidence ......

Sept. 23, 2018

Introduction


It is 9:42 PM. I like to write a blog related to the topic called confidence. How to have confidence to make a living in the city of Vancouver? I played tennis this evening over one hour from 6:00 PM to 7:00 PM, I thought about a lot on tennis court. I knew that it is time for me to relax and also enjoy the sports.

Bible study


I spent one hour to watch the pastor Hua Xin's video. Here is the link.

40 medium level tree algorithm 26 to solve

Sept. 23, 2018

Introduction


I like to start to work on medium level algorithms. I choose to work on tree algorithm, 40 medium level algorithms, I solved 14 algorithms before, I need to solve 26 medium tree level algorithms this time.

I plan to work on those 26 medium tree level algorithms together. It is much better to learn those algorithm together.




893. Groups of Special-Equivalent Strings

Sept. 23, 2018

Introduction


It is time for me to post my code and also study discuss on Leetcode.com. I chose one of 10 string algorithms I worked on today.

My practice


Here is my discuss link. I also added one reply to give me comment on a post to point out a bug in the code. Here is the reply.

Say goodbye to easy level string algorithms

Sept. 23, 2018

Introduction


It is a normal Sunday, but I wrote 10 easy level string algorithms. I completed all 31 easy level tree algorithms, last few days I completed around 20 of them.

It is time to make this day special. I will remember that number 230. 

Make it special


I chose to share a few of algorithm on Leetcode discuss, and also wrote some answers for the questions in the discuss. 

893. Groups of Special-Equivalent Strings, my blog link is here

Leetcode 788. Rotated digits - dynamic programming, my blog link is here.

Leetcode weekly contest 103

Sept. 23, 2018

Introduction


I like to write a blog for Leetcode weekly contest 103. I played the contest but I learned that it is tough experience. I only felt frustrated very short time, I like to get back to my Leetcode easy level algorithm practice as soon as possible.

The idea of training is to work hard, and work on my target. My target is to solve more problems using existing talent as quick as possible. Meanwhile I will try to build a good habit to solve problems every day.


Saturday, September 22, 2018

Leetcode 788. Rotated digits - dynamic programming

Sept. 23, 2018

Introduction


It is so surprising that I have chance to learn a dynamic programming solution through the discuss. Here is the link to study dynamic programming solution for the algorithm. I will write one using C# as well. 

My practice

Here is my discuss link. I also answered one of questions, here is my answer. 

learn Java design pattern

Sept. 22, 2018

Introduction

It is time for me to learn Java design pattern. Here is the link.

Leetcode 788. Rotated digits

Sept. 22, 2018

I wrote the first submission using my own thinking. Here is my Leetcode discuss link. After that, I studied Leetcode discuss, and then I wrote an elegant one. Here is the second discuss link.




Object-oriented programming

Sept. 22, 2018

Introduction


It is time to document my practice over 10 hours. I learn to design classes using Abstract, Virtual, override, and also Interface. It is very good exercise and I learn to work hard to make it work as well.

I will share my C# source code here.


Solve easy level algorithms

Sept. 22, 2018

Introduction


It is easy to find blogs related to topic using keyword: solve easy level algorithms. Here are blogs for me to go over and review.

I find out that I finished 50 easy level array algorithm from August 14 to Sept 4, 2018. I found out that my experience of 5 easy level algorithms a day, 10 easy level algorithms a day. I learn to rush to do more work after I complete those practice.

How to measure my practice? 


It is an interesting topic to look into. I learn to work on 5 easy level algorithm, and then 10 easy level algorithms a day. What is maximum number I can reach in one day? Can I solve 20 easy level algorithms a day?

August 14 - Sept. 4, 50 easy level array algorithms
Sept. 4 - Sept. 20, 2018, 20 easy level math algorithms



Amazon prime video

Sept. 22, 2018

Introduction


It is time for me to continue to learn Amazon prime video. I have chance to learn so much about the group this June 2018. I like to continue to learn things by myself.


Spotify

Sept. 22, 2018

Introduction


It is time for me to study one business a time. I think that it is best for me to learn more business. Stream service is so popular and I just had experience to learn Amazon prime video this past June 2018.

I just read one article written by a software engineer in Spotify.


Everyone can be ambitious but action speaks its own

Sept. 22, 2018

Introduction


It is most common talk in the mock interview on interviewing.io. I usually ask the interviewee what companies to prepare for the interviews. A lot of times the players tell me that eventually they like to work for big 4 software companies. I also like to say that over years as well.

Action speaks its own


It is hard to act on it. I learn how to manage the practice, use metrics to read data and then analyze my progress, submission in the last 12 months, contest global ranking, solved algorithms.

I started to work on Leetcode algorithm from January 2015. But I did not learn how to solve more algorithms in short time. After one year, second year, third year, now it is fourth year. I got a coach in June for two weeks, and then he gave me advice in July 10, 2018.

One thing I like to do is to work on Leetcode easy level algorithm, solve 200 easy level algorithms first. I started this July 10, 2018, right now I have solved 120 easy level algorithm. Still I have 80 algorithms to go.

The secret - talk to the best player


I learn to talk to the best player, and be humble, take advice.



Leetcode contest study

Sept. 22, 2018

Introduction

It is the study called Leetcode weekly global contest ranking.  I studied top 300 global ranking of Leetcode contest, and then I found some article to read.

Leetcode progress study


Here is my Leetcode progress: 37762, contest ranking 14347.


I know that next 200 algorithm to work on, 50 will be easy level algorithms, rest will be medium level or higher.

Compared to the author of article, I learn that I have to work on another 200 algorithms at least, and also I need to push myself work hard on Leetcode algorithm. I need to advance my global contest ranking to top 5000 first.






Leetcode easy level algorithms

Sept. 22, 2018

Introduction


I like to get a list of easy level algorithms to work on first.

Easy level algorithms


Here is the list of easy level algorithms for me to work on.

easy

11-bit manipulation
10 - design 
8 - linked list
7 - stack 
3 - sort
3 - greedy
2 - backtracking 
1 - heap 

The link to get Leetcode easy level bit manipulation is here. And then click difficulty to sort by easy level to hard level order. 

There are 45 easy level algorithms for me to practice first. I should be able to easily solve another 45 algorithms in short future. 


Leetcode progress report

Sept. 22, 2018

Introduction


It is the learning process for me how to handle frustration and failure. I learn to read my own data first. Here is my Leetcode progress report. I finished 219 algorithms, and played four contests. My ranking is 14347/ 69980.

I know that I have to be patient and then work on more Leetcode algorithms.

A comparison


I had chance to meet a new graduate from university in China, and he finished over 400 algorithms, and his contest ranking is around 2000.

He started to practice Leetcode from 2017 Oct., before that he worked on BOJ and worked on more than one hundred algorithms.

My Leetcode ranking is 37762. Contest ranking is 14347. I checked in Sept. 22, 2018, 11:11 AM.


I like to find ways to complete another 200 Leetcode algorithms in next 6 months.

I like to work on two targets, the first one is to complete another 200 Leetcode algorithm practice. The second one is to advance ranking of contest to first 2000 as well. The young graduate is my role model.


My fourth interview on interviewing.io

Sept. 22, 2018

Introduction


It was my 9:00 PM mock interview, and it was my fourth interview as an interviewee. I had chance to work with the interviewer, and I answered the first three algorithms and explained the ideas in the first 12 minutes, and then moved on the fourth algorithm which is the hard level Leetcode 212 Trie. I explained the idea how to solve the algorithm, and wrote the code until we reached 45 minutes mark. We chat about 15 minutes about practicing and learning.

I had 10:00 PM mock interview as an interviewer, and I did not explain to the interviewer of 9:00 PM until 10:01 PM. I rushed to say goodbye and then started my 10:02 mock interview.

My performance


Group anagrams

Minimum meeting rooms



Find words in the dictionary


My feedback as an interviewee


Would you want to work with this person? *

Yes

How excited would you be to work with them? 


Where do I sign?!!?

How good were the questions? 


Really useful/awesome!

How helpful was your interviewer in guiding you to the solution(s)? 


Awesome!

Help your interviewer get better! 




Interviewer's feedback


Do you want to advance this person to the next round (e.g. onsite)? *

No

How were their technical skills? 

starstarstarstar
Could use improvement

How was their problem solving ability? 

starstarstarstar
Could use improvement

What about their communication ability? 

starstarstarstar
Amazing!

Help your interviewee get better! 

Thursday, September 20, 2018

Number of segements in a string

String easy level algorithms (shared 9) 
14. Longest Common Prefix
38. Count and Say
345. Reverse Vowels of a String
434. Number of Segments in a String
443. String Compression use count variable to avoid backward lookup
443. String Compression My idea -look ahead and backward
443. String Compression Elegant solution to learn
459. Repeated Substring Pattern
680. Valid Palindrome II Optimal solution
680. Valid Palindrome II 418/460 test cases passed Time limit exceeded
686. Repeated String Match memory limit exceeded for last test case 
686. Repeated String Match memory limit exceeded for last test case
859. Buddy Strings

Reverse vowels of a string

String easy level algorithms (shared 9) 
14. Longest Common Prefix
38. Count and Say
345. Reverse Vowels of a String
434. Number of Segments in a String
443. String Compression use count variable to avoid backward lookup
443. String Compression My idea -look ahead and backward
443. String Compression Elegant solution to learn
459. Repeated Substring Pattern
680. Valid Palindrome II Optimal solution
680. Valid Palindrome II 418/460 test cases passed Time limit exceeded
686. Repeated String Match memory limit exceeded for last test case
686. Repeated String Match memory limit exceeded for last test case
859. Buddy Strings

Repeated substring pattern

String easy level algorithms (shared 9) 
14. Longest Common Prefix
38. Count and Say
345. Reverse Vowels of a String
434. Number of Segments in a String
443. String Compression use count variable to avoid backward lookup
443. String Compression My idea -look ahead and backward
443. String Compression Elegant solution to learn
459. Repeated Substring Pattern
680. Valid Palindrome II Optimal solution
680. Valid Palindrome II 418/460 test cases passed Time limit exceeded
686. Repeated String Match memory limit exceeded for last test case 
686. Repeated String Match memory limit exceeded for last test case
859. Buddy Strings

Count and say

String easy level algorithms (shared 9) 
14. Longest Common Prefix
38. Count and Say
345. Reverse Vowels of a String
434. Number of Segments in a String
443. String Compression use count variable to avoid backward lookup
443. String Compression My idea -look ahead and backward
443. String Compression Elegant solution to learn
459. Repeated Substring Pattern
680. Valid Palindrome II Optimal solution
680. Valid Palindrome II 418/460 test cases passed Time limit exceeded
686. Repeated String Match memory limit exceeded for last test case 
686. Repeated String Match memory limit exceeded for last test case
859. Buddy Strings

Number of segments in a string

String easy level algorithms (shared 9) 
14. Longest Common Prefix
38. Count and Say
345. Reverse Vowels of a String
434. Number of Segments in a String
443. String Compression use count variable to avoid backward lookup
443. String Compression My idea -look ahead and backward
443. String Compression Elegant solution to learn
459. Repeated Substring Pattern
680. Valid Palindrome II Optimal solution
680. Valid Palindrome II 418/460 test cases passed Time limit exceeded
686. Repeated String Match memory limit exceeded for last test case 
686. Repeated String Match memory limit exceeded for last test case
859. Buddy Strings

String compression

String easy level algorithms (shared 9) 
14. Longest Common Prefix
38. Count and Say
345. Reverse Vowels of a String
434. Number of Segments in a String
443. String Compression use count variable to avoid backward lookup
443. String Compression My idea -look ahead and backward
443. String Compression Elegant solution to learn
459. Repeated Substring Pattern
680. Valid Palindrome II Optimal solution
680. Valid Palindrome II 418/460 test cases passed Time limit exceeded
686. Repeated String Match memory limit exceeded for last test case 
686. Repeated String Match memory limit exceeded for last test case
859. Buddy Strings

Valid palindrome II

String easy level algorithms (shared 9) 
14. Longest Common Prefix
38. Count and Say
345. Reverse Vowels of a String
434. Number of Segments in a String
443. String Compression use count variable to avoid backward lookup
443. String Compression My idea -look ahead and backward
443. String Compression Elegant solution to learn
459. Repeated Substring Pattern
680. Valid Palindrome II Optimal solution
680. Valid Palindrome II 418/460 test cases passed Time limit exceeded
686. Repeated String Match memory limit exceeded for last test case 
686. Repeated String Match memory limit exceeded for last test case
859. Buddy Strings

longest common prefix

String easy level algorithms (shared 9) 
14. Longest Common Prefix
38. Count and Say
345. Reverse Vowels of a String
434. Number of Segments in a String
443. String Compression use count variable to avoid backward lookup
443. String Compression My idea -look ahead and backward
443. String Compression Elegant solution to learn
459. Repeated Substring Pattern
680. Valid Palindrome II Optimal solution
680. Valid Palindrome II 418/460 test cases passed Time limit exceeded
686. Repeated String Match memory limit exceeded for last test case 
686. Repeated String Match memory limit exceeded for last test case
859. Buddy Strings

Repeated string match

String easy level algorithms (shared 9) 
14. Longest Common Prefix
38. Count and Say
345. Reverse Vowels of a String
434. Number of Segments in a String
443. String Compression use count variable to avoid backward lookup
443. String Compression My idea -look ahead and backward
443. String Compression Elegant solution to learn
459. Repeated Substring Pattern
680. Valid Palindrome II Optimal solution
680. Valid Palindrome II 418/460 test cases passed Time limit exceeded
686. Repeated String Match memory limit exceeded for last test case
686. Repeated String Match memory limit exceeded for last test case
859. Buddy Strings

859. Buddy strings

Sept. 20, 2018

Introduction

I am so excited to work on easy level tree algorithms. I like to write down my experience.

My practice


Here is my link on Leetcode.com.






Wednesday, September 19, 2018

Leetcode 224. Basic calculator

Sept. 19, 2018

Introduction


It is a medium level algorithm and stack is used to solve the problem. I plan to work on it very soon.


Tuesday, September 18, 2018

100 easy level algorithms

Sept. 18, 2018

Introduction


It is 11:39 PM. I like to choose a small research topic to write a blog. I like to look into how many things I should work on in order to improve the efficiency to solve algorithms problems.

Let me get some data, and then plan to look into them. I need to learn how to analyze my submissions as well.

100 easy level algorithms


I finished over 100 each easy level algorithm from July 10 to Sept. 18, 2018. I completed 20 easy level tree algorithms from Sept. 18 to Sept. 21, 2018.

Have confidence


It is important for me to learn how to solve more Leetcode.com algorithms. To start easy level algorithms, I can build some confidence.

Here is one of sharing written in Chinese.

简单题。 对于新手来说,简单题是最容易上手且最容易做出来提升自信的题目。




Five year career path study

Sept. 18, 2018

Introduction


It is so surprising that I saw Linkedin notification. And one of 1st link joined Google recently, the career path is this way, Vancouver SFU -> SAP -> Amazon -> Sales Force, and then USA Google. It takes around six years from 2012 to 2018.

It is 11:27 PM. I have 10 minutes to write a topic called how to define a career path. What is most common way to find your next career?

Be realistic 


It is unbelievable journey for me to study.



A day with five easy level math algorithms (V)

Sept. 18, 2018


Introduction


It is hard for me to understand the problem 868 binary gap. It took me more than 10 minutes and then I understood "distance between two consecutive 1's".

My practice


Here is my discussion link.

I also read one of discuss and then was surprise how elegant solution it is. The link is here.

A day with five easy level math algorithms (IV)

258. Add Digits

A day with five easy level math algorithms (III)

171. Excel Sheet Column Number

A day with five easy level math algorithms (II)

Sept. 18, 2018

Introduction


It is the first time I tried to push myself to finish five easy level algorithms. And also I tried to follow my stress level through the problem solving. The second algorithm is 13. Roman to Integer.

My practice


Here is my discussion link.


A day with five easy level math algorithms (I)

Sept. 18, 2018

Introduction


I like to write a blog to document my day with five easy level algorithms. If I can finish every algorithm in less than 15 minutes, then I only need less than 90 minutes.

It is just one and half hour. And I will be free to do anything else for the day.

True story


The first algorithm 453. Minimum Moves to Equal Array Elements, I misunderstood the problem statement, after I submitted the code, I noticed that n - 1 element should be selected every time, not 2 elements.

And I continued to work on the algorithm, I think that it is too much work to increase one for n - 1 elements, because it can not be determined easily. So I considered the case to change one element to  decrease one instead.

Those two instances takes me extra time. I stopped to work on the easy level algorithm, and started again next morning.

Here is my discussion link on Leetcode.com.

Actionable Items


I need to work on algorithm problem solving every day, so I can improve my reading skills.


Coursera courses

Sept. 18, 2018

Introduction


It is a busy year, I started to subscribe Frontendmasters.com and also pluralsight.com starting from January, and then I stopped both of them in July. I found out that I do not have time to learn something from those courses.

Today I spent over 30 minutes to study subscription on Coursera.com.


Ideas to evaluate


Subscribe monthly subscription for algorithm speciality, and then get some learning over there.

Audit is free. So I should spent time to watch those videos and learn algorithm better.


Monday, September 17, 2018

Leetcode contest leader board top 250

Sept. 17, 2018

Introduction


It is my 30 minutes study of Leetcode contest leader board top 150. I did have some experience on Hackerrank contest leader board. The link is here, global ranking.

My understanding


My job is to get some common sense about the talent and how strong they are, what jobs they have, age and experience. The numbers I look into are submission last year, total submission, and education etc.

I think that it is so important for me to understand how good they are. Compared to those players, I have a lot of work to do to catch up.

I read one of players's github in top 250, he finished over 500 algorithm in 45 days. I just could not believe that.