Wednesday, October 31, 2018

How to turn $10 into $100

Oct. 31, 2018

Introduction


It is a short video called How to turn $10 int $100. I like to take some notes here.

Rules


1. Buy low sell high
2. Max margin
3. Min costs


10 things you should never buy

Oct. 31, 2018

Introduction


It is a good video to watch. Here is the link of the video.

10 things you should buy

Oct. 31, 2018

Introduction


It is a short video and I like to take some notes from the video. Here is the link.


143. Reorder list

Oct. 31, 2018

Introduction


It is a medium level linked list algorithm. As a programmer, I learn that it is so important for me to take time to write those classical algorithms related to linked list.

My practice


Here is my discuss link.

Medium level linked list
138. Copy list with random pointer The elegant solution
143. Reorder the list 
147. Insertion sort list hard to write but is readable
445. Add two numbers II
817. Linked list components using hashset

445. Add two numbers II

Oct. 31, 2018

Introduction


It is a medium level linked list algorithm. I wrote the solution using stacks and then I found out that it is easy to write.

My practice


Here is my discuss link.

Medium level linked list
138. Copy list with random pointer The elegant solution
143. Reorder the list 
147. Insertion sort list hard to write but is readable
445. Add two numbers II
817. Linked list components using hashset

147 Insertion sort list

Oct. 31, 2018

Introduction


It is a medium level algorithm. I wrote the idea and it took me more than one hour to write. I like to write something about the practice with more detail later.

My practice


Here is my discuss link.

Medium level linked list

138. Copy list with random pointer The elegant solution
143. Reorder the list 
147. Insertion sort list hard to write but is readable
445. Add two numbers II
817. Linked list components using hashset

Sunday, October 28, 2018

Barbara corcoran

Oct. 28, 2018

Introduction


I came cross this TED talk about failures, Rethinking failure: Barbara Corcoran. Here is the link. I like to spend some time this year to study Barbara corcoran, and hopefully I can learn something basics from real estate, how she made good career in the industry.

One of videos I watched is here.

Tenure Length of Tech Titans Compared

Oct. 28, 2018

Introduction


I came cross this statement, "Microsoft and Google  hire well, and Amazon and Facebook fire well" in the article, and I like to do some short research related to the topic. Here is the article for me to read and study 10 to 20 minutes.


Why you will fail to have a great career

Oct. 28, 2018

Introduction


It is a 15 minutes TED talk. I like to look into the arguments in the talk, "Why you will fail to have a great career ", Larry Smith. Here is the link. Here is the article.


Here is the short articled written by the professor.


The 3 Qualities Needed to Constantly Advance in Your Career

Oct. 28, 2018

Introduction


It is a short video and I like to conduct some short research related to the topic, the 3 qualities needed to constantly advance in your career. Here is the link.


The top 10 traits of people who advance in their careers

Oct. 28, 2018

Introduction


It is time for me to read the article called top 10 traits, here is the link.

My most favorite top three traits


1. See failures as opportunities - ranking 10 out of 10

I failed to research the real estate market in British Columbia from 2010 to 2018, and I ended up wasting a lot of money on my vacation, clothing, shoes, car maintenance etc. I felt so disappointed to myself.

I recalled the test I prepared for Canada citizenship in 2014, I did prepare it in last week; Compared to the sister in the church, she prepared much early, attended two session 3 hours course in Burnaby library, and also shared her experience with me.

I have to overcome this procrastination problem. I pay the big price for the bad habit, since I do not build good habit at the very beginning.

2. Look for a mentor - ranking 9 out of 10

I just could not believe that I chose to have a mentor to help me advance my skills in algorithm and data structure problem solving in June, 2018.

3. Aspire for more - ranking 8 out of 10





10 reasons you don't have a great job

Oct. 28, 2018

Introduction


It is a good topic for me to study. It is called 10 reasons you don't have a great job. Here is the link.

Notes taken


I like to take some notes here.

1. Your standard
2. Oversell yourself
3. Lack of flexibility
4. Attitude
5. Too cool for school
6. Effort
7.
8. Unemployment too long
9. Endorsement
10.

10 Data structure, algorithms, and programming courses

Oct. 28, 2018

Introduction


It is interesting to look into those courses, I purchased one of them from ex-googler, Jeff Bae in June 2018. Here is the link. I plan to spend time to look into those courses later.




Is cash still king?

Oct. 28, 2018

Introduction


It is time for me to study more about people, money, society, and market. I have been in Canada over 9 years, I could not make big progress in wealth making. It is never too late to study about money. I chose the topic "Is cash still king?". Here is the link.

Data


It is so surprising to learn that recession is the best time to invest money on the stock market. I did sell everything in 2009, fifteen year lowest point with my limited IRS mutual fund and stock, and then closed two accounts. I did the opposite.

Stock
             2009       2017
Ford          1           11
Citi            9          74
Disney    13         103
BofA       2.5          32
Amazon  34       1500
Nike        12           66

Ref 1: 17 US companies with biggest pile of cashes.



How to analyze Leetcode weekly contest performance?

Oct. 28, 2018

Introduction


It is a good topic to do some research how to evaluate my Leetcode contest weekly performance. I noticed the first time yesterday after weekly contest 108 the ranking and 5 minutes for each failed submission. I know that it is also very important for me to start the topic, I like to spend more time on ideas thinking in the contest instead of just making one algorithm passing online judge.

What to analyze?


I like to analyze so many things, yesterday the first time I will check player with ranking score 14, what are those global ranking range, how many algorithms they solved already.

I like to list five players scoring 14, and I like to choose them as my role models.

I like to list five players scoring 9, same score, but much more hard working than me. I understand that hard working is one thing, scoring high is another talent, I need to pay attention to, I like to learn how to improve.

Here is the blog I like to read from a player who solved 4 algorithms in the contest.

I like to look up some profiles and see how they advance their rankings.

Here is one in top 100. A player can change his major from medical to computer science. It is an interesting story.

Very well written blog, a player with full score on weekly contest 108. The blog is here. The leetcode profile is here.




Jane virgin

Oct. 28, 2018

Introduction


It is the show I like to watch again. Today I spent over one hour to watch the show, it was so relaxing and I had such great time. I think that in order to improve my performance on algorithm and data structure problem solving, first thing I have to do is to learn to relax and have some entertainment on netflix.com.

Ten hours


I like to plan to spend 10 hours time to watch the show. One reason I like to watch the show is that I used to live in Florida over 14 years. I miss Florida, I have three day vacation, I checked the airline ticket $400 us dollars.

Last time I watched Jane virgin is almost two years ago. I need to watch more shows to catch up ideas about fashion, good conversation and everything.

Saturday, October 27, 2018

930. Binary subarray with Sum

Oct. 27, 2018

Introduction


It is now 9:28 PM. One hour 28 minutes after the weekly contest, I was more busy after the contest. The contest lasts 90 minutes, and then I spent another 90 minutes to study discuss. It is most busy time in the week and I enjoyed playing and also learning.


My practice


Here is the code I wrote in the contest. It took me one hour and five submissions in order to pass online judge.

I learned one optimal solution after the contest. Here is the link. I like to write a C# solution as well.




Leetcode weekly contest 108

Oct. 27, 2018

Introduction


It is another weekly contest, I did prepare better this time. I ate an orange before the contest to make sure that I will not feel headache, since I played some tennis before the contest. I like to perform better this time.

My performance


Here is my performance. I solved two algorithms in the contest. Second algorithm is not too hard, but I had so many issues and needed to work with online judge four times until I can pass the online judge.


After the contest


I learned an optimal solution and dynamic programming solution for question II - 930. Binary subarray with Sum. I will write those two solutions in next one hour or two.

Next time in the contest, I should think about the elegant solution first. In theory, there is an elegant solution for each algorithm, it takes less than 10 minutes. I need to think about 10 minutes carefully, this way I can finish three algorithms and then advance my ranking.

I checked player's the ranking of contest with score 14, which is in the range from 80 to 8,000, so my global ranking of contest 13, 000, the performance of contest matches my ability. I only solved 270 algorithms, I did see players solved 800 algorithms with score 14.


How to advance global ranking on Leetcode weekly contest?

Oct. 27, 2018

Introduction


It is a good research topic I can look into 20 minutes before the contest starts at 6:30 PM. How to advance my contest ranking? I had the lesson last week, I did not choose to work on an easy level algorithm, but I tried to work on a hard level algorithm almost one hour but failed to score anything. That brings my attention to do this research.

Global ranking


Right now my ranking is around 13,000, and I like to advance to top 10,000 first. I like to see how long it takes me to advance 3,000 in the ranking. I like to try the easy level algorithm first, since the hard level has complicated edge cases, it is hard to pass all test cases in the contest.

Also I like to work on my reading skills, specifically I like to learn IELTS reading skills and writing skills both. It is much better for me to work on two things in the same time.




How to double your money?

Oct. 27, 2018

Introduction


It is time for me to do some study about money. Here is the perfect topic, how to double your money? This is 25 minutes video, and I like to take some notes from the video.



How to deal with anxiety attacks & depression

Oct. 27, 2018

Introduction


I do not know how to measure anxiety attacks & depression, but I know that it is a serious problem if we do not learn how to prevent and handle it properly. I think that most important is to find something really enjoyable to do every day, live in the present.

Continue to learn


I also like to watch the video by valuetainment, here is the link.

I did remember that this August my sister visited the city of Vancouver, she paid for the ticket to invite me to show fly over Canada in the Canada place. I was filled with so many emotions, I was so afraid one time on the show. After the show, I never felt so relax first time in last three months.

I wrote a few blogs and here is one of them.

Easy level algorithms

Oct. 27, 2018


Introduction


As a software programmer, I I solved 88 algorithms with 321 submissions from August 31 to Oct. 26, 2018. I like to write down my mark, and also I like to analyze my problem solving skill based on the facts that I can solve 88 algorithms in less than two months. 


My attitude


It is so important for me to keep working hard. I got the advice to work on easy level algorithms first. I have no excuse that I cannot solve easy level algorithms. So I just continued to work hard, solve those algorithms as quick as possible. 


Now I have to come out ideas how to solve medium level algorithms and how I should persuade myself to solve those hundreds of medium level algorithms. 

I like to be competitive player, and also I like to hold high standards as a software programmer. I like to push myself hard, and also like to challenge myself to take myself outside of comfortable zone. 


10 dumbest mistakes entrepreneurs make with their money

Oct. 27, 2018

Introduction


It is time for me to watch a few videos, I like to learn things from those videos. The video is called 10 dumbest mistakes.


16 time wasters of entrepreneurs

Oct. 27, 2018

Introduction


It is time for me to expand my knowledge and search for solutions to my existing problems. I need to find tips how to find nice ideas, good things to do. One is to watch this video called 16 time wasters of entrepreneurs. Here is the link.


Case study of my Chinese vacation trip 2012 (II)

Oct. 27, 2018

Introduction


It is time for me to review my expenses, and I was so surprised that I spent so much on a China vacation in 2012 spring festival. I did try to analyze what was happening, and then I have to learn how to analyze my consumer behavior, since I may make similar mistakes in other activities. I like to do some research about money, how I have to catch up and get smart on those trips.


707. Design linked list

Oct. 27, 2018

Introduction


It is an easy level linked list algorithm. I had good time to learn from my submissions and then finally after hour long work I wrote a solution to pass online judge. I understand that it is so important for me to learn and the online judge is such a good tool for me to test my thinking process. I do like to fix those edge cases, and also very am pleased to go ahead to make it work.

My practice


Here is the link I shared my practice on Leetcode.com.

Friday, October 26, 2018

Linked list easy level algorithms

Oct. 26, 2018

Introduction


There are seven easy level linked list algorithms on leetcode.com. I plan to work on those algorithms this weekend.

My practice


I will complete those algorithms first, and then post the discuss link in the following. Those algorithms are 21, 83, 141, 160, 206, 237, 876.




703. Kth largest element in a stream

Oct. 27, 2018

Introduction


It is an easy level heap algorithm. I thought that I can write a solution using minimum heap quickly, but it took longer than one hour. I submitted more than four times and then finally I made it work.

My practice


Here is the post I shared on Leetcode discuss.

I like to write down very good experience to learn to design a minimum heap using SortedDictionary again, this time I also learned that time out issue, since I chose to count of minimum heap using SortedDictionary.Values.Count instead of keeping tracking of it by an variable actualSize.

What I did surprisingly is how to fix the timeout issue? Do SortedDictionary have issue with First() api related to time complexity?


I choose a good fight


One thing I like to do is to go for those easy level algorithms first, and also I like to show my problem solving skills.

First, I reviewed my past practice and I learned using SortedDictionary to write a minimum heap. I had rich experience to work on coding, since I have solved over 260 algorithms, I had experience to work on Merge k sorted lists, and I did study all C# submissions on Leetcode discuss.

Even though I have a lot of experience, but I still have to discipline myself again. I missed use case actualSize < size related to addNumberToHeap.

Most challenging thing is to solve timeout issue. I believe that SortedDictionary is based on binary tree to maintain the order, and I pinpointed the issue is related to check minimum heap's size. I decided to give it a try to track the size of heap by myself.

All those cases are really part of good workout for me to train myself, prepare myself for future challenge and exciting project to work.

Thursday, October 25, 2018

Case study of my Chinese vacation trip 2012

Oct. 25, 2018

Introduction


It is time for me to do some case study, so I have time to correct my behavior, and learn how to enjoy good life with less expenses. I like to do a case study of my China trip 2012, a vacation trip.

Case study


I like to figure out what kind of person I am in terms of consumer and also an investor. Do I need to learn some basics again? I have a friend who chose to purchase a home in the city of Surrey over five years ago, but she did not take vacation every year to China last 8 years, only one trip to China. And she did not choose to purchase a car and try to save the money, now the home price is more than double.

It is time for me to review what I did, I took China vacation every year from 2012 to 2018. I enjoyed life so much now I have to work on the problem how I can afford a home in Canada. It is time for me to learn how to make money, work hard.

Airline ticket price


I need to spend time to do research about ticket price. The market is going up and down. April is best time to travel, in terms of weather and cost of airline ticket. I need to get smart on planning ahead, budget a economical trip.

First, I was surprised that I chose to take vacation in Chinese spring festival, the airline ticket costs me $1,000 Canada dollar in 2012. I did not know in 2012, I can get the ticket price around $500 dollars to travel to China in April since it is slow season in April.




The 20 rules of money

Oct. 25, 2018

Introduction


It is never too late how to save money and make money. I reserve every night of October for me to learn how to save money, and make money. I will do a few case study and show that I can save thousands if I learn at the very beginning.

Here is the video called The 20 rules of money.

20 rules 


I like to write down one by one all 20 rules.

1. Game
2. Don't be a hater
3. Double
4. Seduction
5. Timing
6. Boredom
7. Secret account
8. First class
9. Comp plan
10. End of the cash
11. Politician
12. Study smart invest
13. Play your game
14. Index
15. befriend $ maker
16. Diversification is for absolute sissies
17. Leverage
18. Positioning
19. Strategic partnership
20. Big check syndrome



897. Increasing order search tree

Oct. 25, 2018

Introduction


It is an easy level algorithm. I tried to work on one easy level algorithm tagged as tree, BFS and DFS. The algorithm called increasing order search tree is the one.

I chose the algorithm to celebrate my 1000th submission on Leetcode.com.

My practice


Here is the discuss link I posted on Leetcode.com.


Wednesday, October 24, 2018

1000 submissions

Oct. 24, 2018

Introduction


It is time for me to work on one easy level algorithm, so I can have 1000 submissions. I am so excited to work on my 1000th submission in short future.


What it takes


It takes a lot of hard work, time and also wisdom to reach 1000 submissions. It is much hard to compare to get a gold medal on Hackerrank.com, and also any course work I had in mathematics major in Florida Atlantic University, all courses work together in my bachelor degree and master degree, include Ph.D. study.

I also have to learn so many things in order to make a successful submission sometimes.

The Leetcode community is different from Hackerrank, some of us are ready to share just after the contest. The discuss ratio compared to all submissions is not that high, for example, over 300,000 submissions in 39 Sudoku solver only less than 400 discuss.

This is also time for me to learn how to write code; I am so glad to read ideas and then write code for various ideas.

I learn from my own experience, last month I worked on easy level algorithm binary watch, I felt nervous as I did in the phone screen. But once I started to read various ideas, I felt so relax and enjoyable to work on those ideas. I learn to deal with my own emotions, I have to push myself hard to think independently more often, before I read the discuss. I will have to get used to figure out things by myself. Hopefully next 1000 submissions I can train myself to overcome this nervousness issue.

Those 1000 submissions also help me to have the chance to be get two phone screens and one onsite interview this year. Without those encouragements from Amazon and Facebook, a few of local companies, I will not be smart enough to work on so many submissions. I also had thanks to my ex-coach, I have to stay humble and work on those easy level algorithms first, without those 200 easy level algorithms practice, I will not have chance to reach 1000 submission mark.

My personality is kind of over confident sometimes, and sometimes low on confidence. I have to learn how to make good judgement where I am in terms of confidence level.

I have to stay humble, start from easy level, and work on the foundation skills. I also overcome my shyness, first time in those easy level practice, I decided to share my practice on Leetcode discuss. I started from August 11, now it is two months experience with over 100 sharing 20 reputations.

Also through those easy level algorithm practice, I started again to play Leetcode weekly contest, I have played over 8 contest last two months. It is so good journey for last two months. I read one blog I wrote in August 31, at that time, I solved 177 algorithm with 679 submission. Based on the facts written in the blog two month ago, I can easily find out that I solved 88 algorithms with 321 submissions from August 31 to Oct. 26, 2018.


Over 9000 submissions on Leetcode.com

Oct. 24, 2018

Introduction


It is time for me to write something called over 9000 submissions. I chose to follow my ex-coach's advice, and then I work on easy level algorithms first. I chose to work on two easy level back-tracking algorithms, I found one most elegant solution. And then I studied the player, over 9000 submissions.

9000 submissions


I read the number, and then I talked to myself. I am gambling to try my luck to compete with those hard working players. With the experience of 900 submissions, how can I compete with people with over 9000 submissions.

Can I work on 500 more submission this year?

A player can work on 9840 submissions on Leetcode.com, and also he managed to complete 760/921 algorithm, his ranking on contest is 1113/72819. Leetcode ranking is 366. He also completed 86 mock interviews, with overall percentile 72%.

I like to compare to my data. I solved 265 algorithm, contest ranking is after 13,000. The overall ranking is after 20,000.

Three ideas


I need to find out ways to have more submissions on Leetcode.com. One thing I can think about is to work on those 200 easy level algorithms again, but this time I will submit different ideas for those algorithms. So maybe I can make more than 600 submission, each algorithm 3 submissions more.

I also can try to work on medium level algorithm or hard level algorithms now. There is nothing I can be afraid of. The idea is to shorten the time to work on medium level or hard level algorithm to 20 to 30 minutes, and go back to work on easy level algorithms and learn better on those algorithms.

Easy level algorithm is really a good playground for me to learn. There are more players to share the experience, more ideas for me to learn and practice. And also I can really build up confidence to write code every day, learn how to overcome the stress or intimidation for coming out the idea to solve the problem by myself.

Follow up 

Oct. 29, 2018

Another idea is to find one good sharing post for hard or medium level algorithms, the thing I like to focus on is to imitate the role model and write my C# solution. This may be a good idea for me to try, at least I can find 20 or 30 players with good writing skills and patience.

Nov. 5, 2018

I also like to find out how I can find time and get some tips to work on more algorithms. One idea is to study kid's playground, how kids learn to play in the playground. Since Leetcode actually can be treated as a playground for so many players.

I believe that medium level or hard algorithms are good playground for me. I do not need to stick on one hard level algorithm. As long as I keep going, I will build up some skills through those practice.

One idea is to go over same category algorithms together, work on together. One idea is to work on the algorithm 8 hours a time, and see how I can improve my performance, what problems I have in those 8 hours.

Last time I did work on 8 hours for linked list algorithms. I found out that I really felt so exhausted after 4 hours. I need to take breaks. Another thing I found out is that I did not push myself hard to think about constraint, and then play with the linked list and then come out by myself.

The biggest problem is that I do not want to push myself to think independently.




Tuesday, October 23, 2018

Most efficient way to train myself

Oct. 23, 2018

Introduction


It was so surprising that I found one algorithm called binary watch to work on. I found out that it was most rewarding experience to work on more than five practice in a day. I really enjoyed the learning. I also think that most efficient way to train myself is to write as many ideas as possible. There are more than 200 discuss, I should write as many ideas based on those sharing.

Algorithm and data structure


I think that most efficient way is to write code every day. Specially for an algorithm like binary watch, it is such great tool for me to train myself.

I have chance to work on bit manipulation, recursive function, and learn a few things through C# coding. 

Follow up 

Oct. 29, 2018

Avoid long hours to work on one algorithm


I think that it is much better to work on easy level algorithm. If there is something hard to solve, I should work on easy ones first. Through those easy ones, I may find good ideas through Leetcode discuss. I also may learn different ways to solve the problem.

Make Leetcode weekly contest part of training. Take it easy for the weekly contest, so I will be more happy to take part in every contest. I also can think about those 4 algorithms in 90 minutes should be a good sprint. I can use this format to train myself as well.

Set a good goal


One goal is to be able to pass any high standard algorithm and data structure interview, no matter it is a phone screen or onsite. But I also can train myself to pay attention to my own habits, the way I solve problems, the way I choose to communicate. I should find something to work on. For example, I started two months ago to write for Leetcode discuss.

Another thing is to prepare early. How to prepare early? I need to gather some information first, I need to gather some data how others train themselves, specially those top performers.

I like to build up a good habit to be an educator in other areas as well. 

Leetcode 401. Binary watch

Oct. 23, 2018

Introduction


It is an easy level algorithm I chose to work on. It is marked as backtracking in my 34 easy level algorithms to work on, I documented the detail in my blog. What I was surprised to learn that the algorithm has 240 discuss, and I did study over five of them, I wrote five solutions.

My practice


There are so many good ideas to work on. I like to write more solutions later on. I was so surprised there are so many good players and I like to choose them to be my role models.

Here is my folder to contain all my practice.

Here is the discuss link I wrote for bit manipulation and recursive solution. This is most elegant solution I wrote so far.

Still more than 100 discuss to learn from


I am kind of surprise that I can learn so many ideas from the discuss. It is such a good algorithm, I like to write if I have 10 or 20 minutes.

I like to share those five practice first on Leetcode.com.


Sunday, October 21, 2018

IELTS & TOEFL Writing: 5 Common Mistakes

Oct. 21, 2018

Introduction


It is time for me to learn something better in my life. One way is to find those coaching videos. It does not matter, as long as those coaching are really making good sense, related to most important and basic skills to living in Canada.

I choose to work on writing skill and learn about common mistakes.

One video a time


Here is the video I chose to watch today.


How to make a good living in Canada?

Oct. 21, 2018

Introduction


It is the first time I choose to spend time to drive to nearby cities near Vancouver in October every weekend, instead of playing tennis, I like to explore nearby cities. I also like to do some research about British Columbia and then I have more knowledge about Canada. I did some research from 2010 to 2018 and stay away from real estate market in Canada. I like to go back to learn some basics again.

A good living


It is important for me to work hard and save money. I also need to learn how to make a good living to invest early using my limited saving. I spent a few trips to Surry, Langley, Abbotsford from 2010 to 2014 to visit those new condos in Surrey and Abbotsford.






IELTS reading

Oct. 21, 2018

Introduction


How to improve my performance in terms of algorithm and data structure training. I play weekly contest and work on easy level algorithms, and last Saturday I failed one easy level algorithm problem understanding. It is the first time I like to try a few weeks to work on IELTS reading skills, one of ideas is to watch a lot of videos from youtube.com first.

One video a time


Here is the video I choose to watch today.

My argument is based on the fact that a good programmer should have very high ability to read and write in English. One way to improve is to keep myself open to those coaching from good educators. I like to learn by myself by watching a lot of videos from youtube.com.

Problem statement understanding - reading challenge

Oct. 21, 2018

Introduction


It is the algorithm I made a few mistakes in understanding in the weekly contest called 926 Flip string to montone increasing.

A few misunderstanings


There are a few misunderstandings, I highlight those place I missed in my 10 minutes thinking in the contest.

A string of '0's and '1's is monotone increasing if it consists of some number of '0's (possibly 0), followed by some number of '1's (also possibly 0.)
We are given a string S of '0's and '1's, and we may flip any '0' to a '1' or a '1' to a '0'.
Return the minimum number of flips to make S monotone increasing.

More detail about understanding:
1. all 0's is fine as an answer
2. all 1's is fine as an answer
3. The string is in pattern of 0's followed by 1's, but my thinking is more complicated, 0's followed by 1's and then continue to have 0's, followed by 1's. I just made the problem very hard and may not have an answer. 

Tsawwassen

Oct. 21, 2018

Introduction


It is a normal Saturday morning, but I got up at 6:30 am to drive to Tsawwassen to help a friend to cross border to land as a permanent resident of Canada.

I spent whole day in the city of Tsawwassen after the visit of border. Two hours in the mill, and one hour in the regional park centennial beach boundary bay.



Saturday, October 20, 2018

Leetcode 926. Flip String to Monotone Increasing

Oct. 20, 2018

Introduction


It is a medium level algorithm. I thought about the solution in weekly contest 107 over 10 minutes, but I could not come out the solution in the limited time. So this is my perfect time to learn the algorithm.

Good idea 


Here is one of sharing written in Chinese.

这道题是一维数组加状态机的动态规划。
我们假定DP J,是到J位符合递增的序列. 那么根据J位是0或1,我们会有2个状态。
如果J位是0,我们只能从J-1位是0得过来。同时如果这个是字符串的第J个和最后的状态要求不同,需要翻成对应字符而需要+1。
如果J位是1,我们可以从J-1位是0 或者J-1位是1得过来。同时如果这个是字符串的第J个和最后的状态要求不同,需要翻成对应字符而需要+1。

作者:西部小笼包
链接:https://www.jianshu.com/p/c8dbaaf87644
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。





Leetcode 927. Three equal parts

Oct. 20, 2018

Introduction


It is a hard level algorithm. I tried to write the solution in the contest but I could not manage to pass online judge since I had several issues.

My solution


I wrote a solution and shared on leetcode discuss. Here is the link.


My journey


I spent 50 minutes to work on the algorithm in the last week contest. I made the first submission until there is 10 minutes left. And then I submitted second time.

First submission is here, line 35 index out of range runtime error.
int index2 = map[numberLength];

Second submission is here, I gave the wrong answer. I need to review the definition of return indexes. Line 44 statement needs to be changed. 


Actionable items


Definitely I should work more carefully on some test cases, so I can verify my code is working for those test cases.

I also need to figure out how to simplify the code before I make any submission. There is a 5 minutes penalty for each failed submission.

Leetcode weekly contest 107

Oct. 20, 2018

Introduction


It is the weekly contest again. I learned a few things this time. It is very important to learn who shared the solution just after the discuss, so I can learn those who performs much better than me.

One role model 


Here is one role model I like to learn from, since the player solved all 4 algorithms and also wrote a blog for each algorithm in Chinese with solutions. Since I almost finish all easy level algorithms on leetcode.com, I should find ways to learn various advanced players, no matter who they are. I like to learn how to advance my ranking in the contest first.


Algorithms


925. Long pressed name code written in contest
925. Long pressed name Elegant solution learned after the contest
926. Flip string to monotone increasing
927. Three equal parts Take me more than one hour


Actionable Items


I need to learn to stay humble. Sometimes I am stumble on easy level algorithm in the contest, and also I could not complete a hard level in the contest. My problem is that I have to rely on Leetcode online judge to find bugs first. 

It is time for me to show my result using an image. I will remember the mistakes I made on second easy level algorithm, and the effort I put in the third hard level algorithm






Thursday, October 18, 2018

My stock and IRA stock account recovery

Oct. 18, 2018

Introduction


It is time for me to get organized. Recently I reviewed through gmail and then recovered the accounts from Ameritrade I had last 10 years. I did sell all the stock and IRA stock back in 2008, and then I moved on. The idea is to focus on one thing only, at that time, it is the immigration.

After 10 years, I learn that I may make the mistake and I should have allowed those stocks to stay in my stock account instead.

What if 


It is so hard to get in Faceook or Amazon to work as a software programmer. But at the very beginning with the phone screen with those two companies, I should purchase 100 shares of stock. I had a phone screen with Facebook January 2015, and I had first phone screen with Amazon back in 2007.

2007 Amazon stock price:   $80/ share -> 8000 dollar investment -> 2018, 100 * 1800 -> $180, 000
2015 Facebook stock price: $78/ share -> 7800 dollar investment -> 2018, 150 * 100 -> $15,000

I can quickly learn from stock's value of those companies, and then I also benefit from the investment more than 100% easily.

Actionable Items

April 12, 2019

I like to write a blog about my first Amazon phone screen interviews and my impression of Amazon as a company and culture.

IELTS writing task 2: The 3 sentence introduction by Jay!

Oct. 18, 2018

Introduction


It is a good idea to learn how to write good introduction from IELTS writing teaching. Here is the video link.

3 step introduction


1. Neutral background sentence
2. Rewrite the question
3. This essay will


IELTS writing

Oct. 18, 2018

Introduction


It is very good idea to save money and time to learn writing just by going through IELTS writing videos. I like to boost my score to 8 if I need to take IELTS test. Here is the video.

I also like to improve my reading skills when I work on algorithm and data structure problem solving. I experienced some difficulty on a few algorithms on problem statement, so I just like to set a target to work on - improving writing skills.

Writing tips


A wide variety of sentence structures.
Grammar - range should not be limited

Accuracy = 9
Range = 4

Task = 8
Structure = 8
Vocabulary = 8
Grammar = 4

six sentence types -
sentence types
1. simple sentence/ compound sentence





Wednesday, October 17, 2018

Kelowna city study

Oct. 17, 2018

Introduction

It is time for me to study a city called Kelowna.


Find a home to purchase in British Columbia

Oct. 17, 2018


Introduction


It is my research to find a home to purchase in British Columbia. I started to study top 10 cities in British Columbia, and then I had so much fun to learn so many cities.


How to become a good programmer?

Oct. 17, 2018

Introduction


It takes so many years for me to finally know how to train myself to be a top programmer. It takes years.

I like to write a blog related to learning experience I had last three months.

Work on easy things first


It is important for me to learn that I should work on as many easy level algorithms as possible. Through those practice, I can build good habits to solve problems every day, write code every day. And also I like to learn various ideas to solve the problem.

I believe that best learner is to learn from the easy things. There are so many things to work on, and it is so easy to advance the algorithm to the hard level one.


Play leetcode weekly contest


I have to push myself hard, and accepty myself for poor results. I have to take part in every contest and also very active to join the discuss after the contest.

I find that it is the way for me to get better and also learn from very good players after the contest.

I am in the stage called hang in there, I just need to join the weekly contest and show the ranking after each contest, and learn quickly after each contest. I need to get more involved in the discuss, and learn from those sharing just after the contest.

Right now, I learn from my Leetcode weekly contest experience. I have some issues sometimes with easy level algorithms; And I also have issues to score hard level algorithms, since there are multiple test cases, I have problems to manage the code in less than one hour for one hard level algorithm.

I need to figure out ways to push myself hard in my daily practice. Now it is too relax compared to the weekly contest.

I believe that it is the way to become a good programmer.



Celebration of 960 submissions

Oct. 17, 2018

Introduction


It is time for me to learn how to be a nice player and say thanksgiving to my coach this June. I had chance to find my weakness, I need to work on easy level algorithms first.

After I solved 160 easy level algorithm, I had chance to celebrate 960 submssions on Leetcode.com.

Get smarter


It is easy to get smarter once I learn from my past 300 submissions. I solved 160 easy level algorithms last three months, I had over 300 submissions.

I started from January 2015. From 2015 to June 2018, I only has submissions on Leetcode.com less than 600.

I need to learn those players, every year with over thousand submissions. Without taking any course, any cost of tuition, one player can learn how to write good program through those Leetcode.com algorithms.

One thing I like to do is to take easy level algorithms first. And also I need to learn that it is important for me to build good  habit to write code everyday.

Submissions


I learn to read other people's profile by checking total submissions.

Here is mine.



Here is my role model with over 2800 submissions. The role model solved over 800 algorithms.

What is difference from mine, 260 solved algorithm, 900 submissions. There are  more than 540 algorithms, more than 1900 submissions. Each contest on Leetcode.com has 4 algorithms, so 540 algorithms can be used almost 150 weekly contest algorithms.

In other hand, every onsite interview from Faceook or Amazon, the interviewee will work on 4 algorithms. The extra practice is like a player having more than 100 onsite interviews experience from various software companies, all of those are very focusing on algorithm and data structure as well.



Say goodbye to easy level stack algorithm

Oct. 17, 2018

Introduction


It is very good learning experience to work on those easy level stack algorithms. I finally had time to work on those algorithms one by one. I still remembered that I was told to work on easy level algorithms this June, and I had a coach session with the coach related to next greater element algorithm.

Easy level algorithms


Here is the image to show all easy level algorithms I completed.


Easy level stack algorithm (solved 7/7, shared 7)

20. Valid parentheses
155. Min Stack 
225. Implement stack using queues
232. Implement queue using stacks
496. Next great element II
682. Baseball game
844. Backspace string compare

Celebration of 260 mark

Oct. 17, 2018

Introduction

It is time for me to celebrate 260 mark. I just finished 260 algorithms, since recently I solved another five easy level stack algorithms.

I have to stay humble, and also it is very important for me to put the algorithm practice in the highest priority.


682 Baseball game

Easy level stack algorithm (solved 7/7, shared 7)

20. Valid parentheses
155. Min Stack 
225. Implement stack using queues
232. Implement queue using stacks
496. Next great element II
682. Baseball game
844. Backspace string compare

496 Next greater element I

Easy level stack algorithm (solved 7/7, shared 7)

20. Valid parentheses
155. Min Stack 
225. Implement stack using queues
232. Implement queue using stacks
496. Next great element II
682. Baseball game
844. Backspace string compare