Sunday, June 16, 2019

Example coding interview: Designing Google Docs

Here is the link.

Petros is an experienced software engineer and did extremely well in this interview, even though he did not know the particular problem beforehand. My assessment notes follow. In terms of the database, I noticed that he was confident in designing relational database schemas, including many-to-many relationships using intermediate tables (the users - documents relationship in this case). He was also able to identify queries that would run often and point out candidate keys for optimizing the database, including non-trivial composite keys (in our case, the (document_id, revision) composite key). Perhaps the only shortcoming of the interview was that he included an unnecessary 'revision' field in the 'document' table; this was an un-normalized database schema, but he quickly figured it out when I pointed it out to him. In terms of protocols, he was able to successfully leverage the standard Internet protocols, including HTTP for developing a regular API and websockets for implementing a real-time API. He quickly dodged the somewhat misleading question of "what cryptographic scheme would you use to protect the data on the wire" and opted with the ready solution of employing HTTPS. In addition, he mentioned HSTS and certificate pinning, which can offer better security. I was happy to see that he did not propose inventing his own methods, but readily reused an existing obvious solution. In terms of system design, he was familiar with locks and semaphores and used successful analogies to design the first version of the software - where each user must obtain a lock before editing. The next version was developed with a successful analogy with git, for which he showed extreme familiarity. He decided to reuse the git library to implement diffs, which points out that he's not reinventing the wheel, a desirable virtue. He pointed out analogies with git's "rebase", illustrating quite experienced use of version control. He was able to successfully design the system to the end, describe managing conflicts and resolving complicated diffs. Finally, he described an offline mechanism which can allow editing without an Internet connection. His architecture is a classical design pattern which is often used in mobile applications. He leveraged HTML5's localStorage to persist his documents and proposed the use of an offline cache mechanism, which is the right solution here. In the end, he made some insightful comments and suggestions with technologies I did not expect him to be familiar with: Compiling C libraries for the browser, and eventually consistent data structures. Last but not least, he was able to argue against the use of git itself as a backend for this service, and provided convincing technical arguments confidently supporting his views. Such questions are typical in large company software interviews, especially for full-time or more senior engineers. They will often contain many of the elements described here: Protocol design, security, database design, analogies to existing software, and library reuse. Thanks for watching! If you liked this video, don't forget to 👍 and +subscribe :) Leave a comment if you have questions or suggestions.

Actionable Items


I like to look into those terms:
1. HSTS
2. certification pinning
3. git's rebase
4. web sockets protocol
5. Html5's local storage
...


Passing the Google interview as a software engineer

Here is the link.

Dionysis Zindros


Coding:

Proficiently
Quickly - ask questions!
Without mistakes
Good practice
Coding style

- C, C++, Java, Python, JavaScript, (Go, Haskell)
STL

2. Algorithms

Graph:
BFS, DFS, Digistra, Bellman-Ford, Floyd-Washall, Ford-Fuekesson

DP: 1D, 2D, ..., correctness, relation
(greedy)

Data structure:

BST(AVL), B-tree, segment/






Grow Past Your Weaknesses - Commencement Speech to Stanford Class of 2019 in Mathematics, Statistics, and Mathematical & Computational Science

Here is the article link.


花花酱 LeetCode进入千题时代 该如何刷题?1/2 - 刷题找工作 SP15

Here is the link.


如何两个月刷题去Google?

Here is the link.


如何高效刷题 - basketwangCoding

Here is the link.


Behavioral Finance

Here is the link.


Saturday, June 15, 2019

Personal finance study progress report

June 15, 2019

Introduction

It is my personal finance research. I like to write the progress report for last six months.


weekly contest 141

June 15, 2019

Introduction


It is my favorite weekly contest. I wrote first two algorithms, the first one I passed the online judge, and the second one I could not pass the online judge, I thought about using greedy algorithm, and the case I thought about is really complicated. I read the third algorithm and came out the solution using BFS, but I ran out of time to write code in weekly contest.

Performance


I wrote the code after the weekly contest. I need to work on a few issues in the contest, I did not have enough time to write the code; and I have some issues related to problem statements.

1089. Duplicate Zeros C# trial and error practice in weekly contest 141

After the contest


June 17, 2019 
1091. Shortest Path in Binary Matrix C# breadth first search practice in 2019
1090. Largest Values From Labels C# Try to solve using greedy algorithm practice in 2019



How to get things done in 90 minutes?


I have to figure out how to manage 90 minutes performance. The most challenging part is to balance all kinds of efforts and produce best solutions for a few algorithms. I have to push myself hard to score more points. 

I spent over 30 minutes to work on the second algorithm, I failed one test case; and then I need to work on bug fix; I ran out of time. 

I know how to solve the third algorithm, and it should not be difficult to write; but at least I need to reserve 20 minutes to work on the algorithm. 

Costly Stock Market Investing Mistakes You Can Avoid

Here is the link.


How to Avoid Emotional Investing

Here is the link.


Understanding Investor Behavior

Here is the link.


Why I choose to be an interviewer?

June 15, 2019

Introduction


It is time for me to write a blog related to why I choose to be an interviewer. I was asked on June 14, 2019 by the interviewee, and also on June 13, 2019 by another interviewee who works for Microsoft Seattle.

Why I choose to be an interviewer?


I like to answer the question and here are some thoughts I talked about on June 14, 2019.

1. I like to master the tree algorithm called lowest common ancestor; I just learn from interviewers by asking them the algorithms;
2. My interviewees are super talent people in the world;
2. A lot of people know interviewing.io, and it is getting hard to compete for those top company jobs;
3. I meet a person who works for Nivida, the stock price goes down 50% last year; people are looking for better place;
4. It is hard to compete those jobs in Facebook, those competitors have more asset, better job, high level positions in current companies;
5. It is hard to be an interviewer. Sometimes I cannot understand the solution written in the interview, interviewee is so talented;
6. I have to push myself hard to learn and be a good interviewer.


236: Lowest common ancestor - practice after mock interview

June 15, 2019

Introduction


Life is such great experience. I like to be an interviewer and also I like to master the tree algorithm called lowest common ancestor. But somehow I will have to train myself to focus, catch up whatever the interviewee writes in the interview.


Case study


I wrote a solution based on mock interview on June 14, 2019. Here is the post titled C# find path for two give nodes in two passes case study in 2019.


Here is the post I share.

It was my mock interview on June 14, 2019 10:00 PM. As an interviewer, the interviewee was asked to solve the lowest common ancestor in binary tree. The interviewee wrote a python code and he finished the code in less than 35 minutes. I wrote a C# solution based on his practice.
Here are highlights:
  1. Use depth first search to find the node, preorder traversal, all nodes from the node to the root are saved in a hashset;
  2. Second search will check the hashset and the first node in the hashset will be lowest common ancestor;
  3. DFS function is designed to return bool value, whereas false value for termination of path, true value to continue to build a path.
Here is the blog to contain the mock interview original python code.
Highlights of super performance of interviewee:
  1. He asked if there is optimal solution with time complexity O(logN);
  2. He proposed naive solution to find the path for node p using DFS;
  3. He asked me if I saw the idea before. He explained to me that return false is part of design, make sure lowest common ancestor is found and then stop update on variable answer.
/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     public int val;
 *     public TreeNode left;
 *     public TreeNode right;
 *     public TreeNode(int x) { val = x; }
 * }
 */
public class Solution {
    public static HashSet<TreeNode> path;
    public static TreeNode answer; 
    
    public TreeNode LowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {
    
        path = new HashSet<TreeNode>();
        answer = null;
        
        DFS(root, p);
        DFS(root, q);
        
        return answer; 
    }
    
    /// The second call will try to find the lowest common ancestor
    /// based on the path found by the first call with the given node    
    private static bool DFS(TreeNode current, TreeNode find)
    {
        if(current == null)
            return false;
        
        if(current == find)
        {
            if(path.Contains(current))
            {
                answer = find; 
                return false;
            }
            
            path.Add(find);
            return true;
        }
        
        var left = DFS(current.left, find); 
        if(left == true)
        {
            if(path.Contains(current))
            {
                answer = current;
                return false;
            }
            
            path.Add(current);
            return true; 
        }
        
        var right = DFS(current.right, find); 
        if(right == true)
        {
            if(path.Contains(current))
            {
                answer = current;
                return false;
            }
            
            path.Add(current);
            return true; 
        }
        
        return false; 
    }    
}

Actionable Items


It is hard to push myself to think hard. 

Here are highlights how I make progress on this idea to find path to solve lowest common ancestors. 

1. Find path from root to given node p, path from root to given node q, and then compare two list, find lowest common ancestor. 

2. Actually we do not really need to find the whole path, save  one path on hashset, and then find lowest common ancestor in the second round traversal of tree to find node q. 

3. We do not need to save second path for second search node at all, just one step at a time to compare with first node's path saved in hashset. 

Also, I learn to work on the path from given node to root instead of root to given node. 


Case study: Lowest common ancestor in Binary tree mock interview

June 14, 2019

Introduction


It was my 10:00 PM mock interview. I like to do a case study on my mock interview with a top-talent interviewee.

Case study


First, I like to put interviewee's code into gist and share here.



Feedback from interviewee 



Feedback from interviewer



Actionable Items

I like to spend some time in short future to put all those mock interview into my github folder. I like to learn from those interviewees, specially those top-talent performers.

Also, I like to write a C# solution and add to my practice in 2019. The link of lowest common ancestor is here. My C# practice is here.



The Art Of Speculation

Here is the link.

speculation
efficient market hypothesis
capital growth
a host of variables
view speculators as gamblers


Top 10 Rules For Successful Trading

Here is the article to read.

Rule No. 2: Treat trading like a business


INVESTING INVESTING ESSENTIALS Long Term

Here is the article to read.


Risk-Return Tradeoff

Here is the article to read.

Your Portfolio Is Due For Maintenance. Here's How To Check It

Here is the article.

I have to learn how to manage my portfolio better. I just set up a new portfolio called Victoria with $45,000 Canadian dollars on Questrade.com, and also a portfolio called Key Largo (name with an island on Key West, Florida USA) $19,200 US dollars on Ameritrade.com, a 401 K with Charles Schwab.com with Par.

One of ideas is to keep reading more content related to management of portfolio.




Thursday, June 13, 2019

System design - blogs related to my study

June 13, 2019

Introduction


It is the biggest challenge for me to learn how to master system design. I have the basic understanding and work on the system design in the past. I like to work on them again in 2019.


System design 


Here is the link to show all system design blogs on my blog website.


It is my vacation day - Want to Work at Facebook? How to Get Hired & Succeed

Here is the link.

Position your attitude – and your résumé – as that of “a builder and a learner.”  

So craft your résumé to highlight points in your career in which you built something new and mastered new skills. Once you’re in the hot seat at the interview, express through both explicit statements and your overall attitude that building and learning are goals as core to you as they are to Facebook.

Expect to work with autonomy and to build your own place at Facebook.


 “self-selected into this environment” during the recruitment process. So rather than handhold by dictating daily tasks, Facebook instead tends to “provide context [about the mission and goals] so people can work with autonomy and know where everything is headed. They can go off and do their own thing.”


Be ready to have tough conversations.

The “social norm” at Facebook is to be pulled into hard conversations with no preparation necessary, which can be difficult for newbies at first. “What we say is that the more frequently you hop on them, the less hard they are,” Goler says.

It is my vacation day - Facebook’s HR chief discusses 5 key tenets of its winning culture

Here is the article.

Being mission-focused
Playing to employees’ strengths
Facebook uses self-assessments and exit interviews to understand how employees feel about their work while also figuring out ways to help them excel.

“The thing that separates people who stay for a long time or who make the choices to leave is how they score themselves on whether they’re playing to their strengths,” Goler tells Glassdoor.
She adds that when employees feel proud about the work they do at Facebook, they are contributing back to the company’s overall mission.
Part of identifying an employee’s strengths is understanding their downfalls. In one episode of LinkedIn founder Reid Hoffman’s podcast, “Masters of Scale, ” Facebook COO Sheryl Sandberg says a resilient organization like Facebook is born from embracing employees’ failures.

“You have to be open to feedback. You have to ask for feedback. You have to build in a culture where, when I think you need to do something better, or you think I need to do something better—we tell each other and tell each other directly, and work it out,” Sandberg tells Hoffman.

Having an authentic boss
If workers are genuinely invested in their jobs, they are more likely to perform better, be more engaged and feel more satisfied, one study shows.
Goler says Zuckerberg’s authenticity and humanity influences the workforce at Facebook. “Mark is so human and so authentic with our team,” Goler tells Glassdoor. “He does a Q&A every Friday. He shows up as he is: The person that you see, his public persona, is the same thing we see internally. You see the warmth and the transparency in his posts; we see the same thing.”

Expecting workers to take initiative
While the company provides the goals it wants to reach, employees have to figure out how to reach those on their own. Goler says that this level of autonomy reminds employees of the value their contributions bring to Facebook.
The company has a culture in which “you don’t have to have a huge amount of experience to be able to do big things,” Zuckerberg told Fast Company in an interview a few years ago.
“That’s been helpful in terms of being able to give really talented folks who haven’t run big things before big roles in the company, and giving them a chance to either show that they can do it, or not,” Zuckerberg says.


It is my vacation day - Google search lori goler facebook

Here is the link.

I like to go over more videos and articles to understand Facebook culture.


It is my vacation day - How to get hired at Facebook

Here is the link.

Followership vs leadership

Manager shows care, support -> ...

Public company, focus on result -> autonomy -> as the way to get the goal.

War for talent - Best of the best

Harvard business - talent chooses another path -not wall street, choose Facebook.

Head to head -> impact -> impact on their role, bigger than their own


Vacation day - Want to Work at Facebook? See This First.

June 13, 2019

It is my vacation day. I like to watch the video again called Want to Work at Facebook? See This First. Here is the link. 

Builder mindset

grades, GPA - love to build, side project 
great example -> showcase, ability to learn 
Share authentically

Culture - every one owns the company, represent the culture. 

Loris Goler - the woman who runs "People Operations" at the world's most admired employer. 

bias - identify, impact our lives. 



It is my vacation day

June 13, 2019

It is my vacation day. I like to attend Microsoft build 12:00 PM - 5:00 PM event.


Develop Good Habits in 7 Simple Steps

Here is the link.


Critical Thinking or To Reason

Here is the link.


How to Think Critically and Problem Solve

Here is the link.

I like to learn from the basics how to do better problem solving. I like to solve some algorithms in short future, so I like to work on some basics.




How to make 100 algorithms problem solving interesting?

June 13, 2019

Introduction


I am still working on finding 100 algorithms for preparation of potential algorithm and data structure interview. I like to figure out how to make those 100 algorithms problem solving more interesting. Should I try some new ideas, reach out community I never think about, or I should work on some other small things: get organized, think carefully, and also learn better to handle stress.

100 algorithms 


It is a lot of algorithms when I try to find 100 algorithms to work on. I like to submit those algorithms as well.


How to plan to solve another 100 algorithms?

June 13, 2019

Introduction


I like to write a small topic about solving another 100 algorithms. It is challenge task to work on. I also think about the reward can be huge as well. I should do something new, walk out of my comfortable zone, just try to push myself hard, learn 100 people who shared the most popular post on each algorithm, from those 100 algorithms.

Another 100 algorithms


I like to show case how luck we are in this age to work on problem solving. We can meet so many people and also work together so closely. I do not think that I can have better career than this one.


Wednesday, June 12, 2019

One of my fingers was on strike

June 12, 2019

Introduction


It is the time for me to think about typing less to write blogs or coding, since I had my first finger strike more than one month ago. It is the first time I learn that being a good problem solver, programmer who likes to code any time, write any time, I have to beg my fingers working  hard for me as well.

One of my fingers was on strike 


I used this phrase today at work and lunch time, my coworker just laughed and she said that she never heard any one talked about it like that.


How to Get Rich: 11 Bold Moves That Guarantee Wealth

Here is the link.

1. Exploit your skill as a self-employed expert and invest in it.

2. Hit $100K, then invest the rest.

3. Be an inventor and consider it as an opportunity to serve.

4. Join a start-up and get stock.

5. Develop property.

6. Build a portfolio of stocks and shares.

7. Start your own business and eventually sell it

8. Find a job in the right vehicle.

9. Cut your expenses.

10. Save it in your bank.

11. Make investments wisely


Julie Zhuo: How a Facebook Designer Thinks [Entire Talk]

Here is the link.

I started to enjoy the talk at 2:51/ 36:53.


The Facebook Interview Guide

Here is the link.


Kabam Inc - Beautiful view on Hackerx day

June 12, 2019

Introduction


It is another Hackerx day. I started to learn from the event better after so many years. I also was surprised best view of ocean, mountain and downtown Vancouver.

Pictures, please!


I also like to share pictures I took through the event.














Facebook’s Secret to Recruiting + Retention Success

Here is the link.

Five core values:
1. Be open
2. Be bold
3. Be fast
4. Build social value
5. ?

Quality control of interview

Remove biases, structure of interview...

Communities -
Short term, middle term, long term strategy - under presented minority

Facebook university program

Huge community internally - we do them for ourselves, feel connected; they have a home.
Managing bias - reality in the world
fairness -

Give HR people -

Hacker month - see if you fit the job and manager likes your performance

Facebook scaling ...

Ownership mindset - 25,000 people work on it.

Workgroup to make Facebook more great.

HR survey - job related factor - manager, cut questions. Where are those mission questions? Deep analytics, mission drives ......

Lesson learned: Do not cut mission questions.

28:00 -
Question: Manager does his job? How to do it?

Engagement survey - identify what differentiate ...
Growing people
Command and control - less command and control
Direct -

Great manager - support, and side by side, not front.
Training - care and support ...

Manager are super happy, dual career path -

Be open - transparency - networking lunch - do look into that.
Show better at work - person you and professional you, who you are.

Be transparent -> ...

Monday, June 10, 2019

48 facebook interview algorithms

June 10, 2019

Introduction


It is time for me to work on facebook interview algorithms. One thing I can do is to find how many algorithms I have not submitted on Leetcode.com


Forty-eight algorithms


Here is the github folder containing all 48 most popular algorithms used for Facebook.com.


Here are 48 algorithms - part I (10 algorithms in one group)

10. Regular Expression Matching
102. Binary Tree Level Order Traversal
121. Best Time to Buy and Sell Stock
125. Valid Palindrome
133. Clone Graph
138. Copy List with Random Pointer
139. Word Break
151. Reverse Words in a String
152. Maximum Product Subarray
161. One Edit Distance

17. Letter Combinations of a Phone Number
173. Binary Search Tree Iterator
200. Number of Islands
206. Reverse Linked List
211. Add and Search Word - Data structure design
215. Kth Largest Element in an Array
221. Maximal Square
230. Kth Smallest Element in a BST
235. Lowest Common Ancestor of Binary Search Tree
253. Meeting Rooms II

257. Binary Tree Paths
261. Graph Valid Tree
273. Integer to English Words
277. Find the Celebrity
278. First Bad Version
28. Implement strStr()
282. Expression Add Operators
283. Move Zeroes
285. Inorder Successor in BST (locked)
300. Longest Increasing Subsequence (meidum, solved 2 years ago)

314. Binary Tree Vertical Order Traversal
33. Search in Rotated Sorted Array
334. Increasing Triplet Subsequence
340. Longest Substring with At Most K Distinct Chars (hard, locked)
377. Combination Sum IV
38. Count and Say (easy)
380. Insert Delete GetRandom O(1)
394. Decode String (medium)
398. Random Pick Index
43. Multiply Strings

49. Group Anagrams
494. TargetSum
56. Merge Intervals
57. Insert Interval (hard level)
67. Add Binary
75. Sort Colors
76. Minimum Window Substring (hard level)
90. Subsets II

Algorithms to work on 


I have not submitted the following 20 algorithms.

151. Reverse Words in a String
161. One Edit Distance (locked)
215. Kth Largest Element in an Array
221. Maximal Square
253. Meeting Rooms II (locked)
261. Graph Valid Tree (locked)
277. Find the Celebrity (locked)
282. Expression Add Operators (hard)
285. Inorder Successor in BST (locked)
29. Divide Two Integers  (medium)

334. Increasing Triplet Subsequence
340. Longest Substring with At Most K Distinct Chars (hard, locked)
377. Combination Sum IV
38. Count and Say (easy)
380. Insert Delete GetRandom O(1)
394. Decode String (medium)
398. Random Pick Index
43. Multiply Strings
494. TargetSum
90. Subsets II

Sunday, June 9, 2019

The only bear market that really matters

Here is the link with a pod cast. I like to spend 40 minutes to listen and learn better from the conversation.


22 things you should know about bear markets

Here is the link.




1079. Letter Tile Possibilities - C# various topics covered in my practice in 2019

Here is the link.

It is the algorithm I learned after weekly contest 140. I was surprised that I have difficulty to come out the solution in the weekly contest, I like to push myself to master the algorithm in next three to six months. One idea is to ask the algorithm in mock interview on interviewing.io as an interviewer, and also practice various ideas using C#.
I also like to put together all kinds of ideas in this post, and then push myself to learn depth first search algorithm better through the practice.
June 8, 2019
Use hashSet to remove duplicate and help to count the total number
C# learn to write a solution after the weekly contest on June 8, 2019
June 9, 2019
Only put unique substring into consideration
C# counting sort and depth first search to count unique substrings practice in 2019
Understand each tile using prefix string
C# case study "AAB" to figure out the solution in 2019


How McKinsey Became One Of The Most Powerful Companies In The World

Here is the link.


If you hold the stock market, you will grow with America, says Jack Bogle

Here is the link.

Grow with America. GDP, annual correlation with GDP.

Question:

Buy and hold is dead?

Answer:

Buy and hold US stock is different. If you hold the stock market, you will grow with America. The stock market is ...

Short way bet is not good way to go. Long way bet is way to go.

Question:

10 Years after the crisis
What's the next crisis?

Mechanic buyers, marketing structure? Liquidity crunch?

If there is panic over there, then there is anywhere.

Which ETF? High yield?




5087/ 1079. Letter Tile Possibilities - case study "AAB"

June 9, 2019


Introduction


It is the algorithm I like to learn as many solutions as I can. I also think about how to use this algorithm in mock interview for me to explore the algorithm as much as I can in future interviews on interviewing.io as a mock interviewer.

Case study


Here is one elegant solution I like to explore, learn and write one.
I wrote C# code based on the above post. Here is the link. Also, I did case study on "AAB", and then I wrote a solution to show all tiles as well. Here is the link.

I also copy and paste the content here.

It is challenging job to write a case study, and then figure out how to interpret the code written in such an elegant solution, the solution post is here. I like to share the solution with case study "AAB" and extra output to show depth first search all result with "AAB" study case.
Case study "AAB"
I like to write down some explanation based on case study "AAB". I am just a learner with some curiousity. Follow me and let me know if I miss the important things in my analysis.
case study: "AAB"
count: A -> 2, B->1
length 1: "A", "B"
length 2:
For "A":
count: A->1, B->1
We can still pick either A, or B
So we have "AA,"AB"
For "B":
count: A->2, B->0
We can only pick A
So we have "BA"
The answer is 8. How to ensure uniqueness?
set prefix = ""
dfs("AAB") -> two distinct chars, 'A', 'B', each one sum variable increment one; related to tile: prefix + "A", prefix + "B".
For 'A' case, next step is to calculate dfs("AB"), what ever it has, the string should be prefixed with "A".
For 'B' case, next step is to calculate dfs("AA"), what ever it has, the string should be prefixed with "B".
So the output of search result is the following:
"A"
"AA"
"AAB"
"AB"
"ABA"
"B"
"BA"
"BAA"
Next step
Since the algorithm is to ask the total number of tile possibilities, we do not need to know all tiles. I mark those lines of code added just to be easily followed.
The code with debugging info
I made a few changes based on study code, so that it is easy to tell statement "sum++", what is the tile content.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _5087_Letter_tile_possibilities
{
    class Program
    {
        static void Main(string[] args)
        {
            NumTilePossibilities("AAB");
        }

        /// <summary>
        /// June 9, 2019
        /// study code:
        /// https://leetcode.com/problems/letter-tile-possibilities/discuss/308284/Concise-java-solution
        /// </summary>
        /// <param name="tiles"></param>
        /// <returns></returns>
        public static int NumTilePossibilities(string tiles)
        {
            int[] count = new int[26];
            foreach (var item in tiles)
            {
                count[item - 'A']++;
            }

            var all = new List<string>();
            return depthFirstSearch(count, "", all);
        }

        /// <summary>
        /// case study: "AAB"
        /// count: A -> 2, B->1
        /// length 1: "A", "B"
        /// length 2: 
        /// For "A":
        ///   count:  A->1, B->1
        ///   We can still pick either A, or B
        ///   So we have "AA,"AB"
        /// For "B":
        ///   count: A->2, B->0
        ///   We can only pick A
        ///   So we have "BA"
        /// Questions:
        /// 1. uniqueness - not duplicated one, how to ensure uniqueness
        /// 2. 
        /// </summary>
        /// <param name="numbers"></param>
        /// <returns></returns>
        private static int depthFirstSearch(int[] numbers, string prefix, List<string> tiles)
        {
            int sum = 0; 
            for(int i = 0; i < 26; i++)
            {
                if(numbers[i] == 0)
                {
                    continue;
                }

                sum++; 
                /* determine what is tile to be added*/
                char toChar = Convert.ToChar('A' + i);
                var nextPrefix = prefix + toChar.ToString();
                tiles.Add(nextPrefix);
                /**/

                numbers[i]--;
                sum += depthFirstSearch(numbers, nextPrefix, tiles);

                numbers[i]++;
            }

            return sum; 
        }
    }
}

William Lee economist

Here is the link.


top strategist Dan Suzuki

Here is the link.

BofA's Suzuki: Stocks go lower before higher in 6-12 months, here is the link. 

Yana Barton, Eaton Vance equity portfolio manager

Here is the link to watch all videos from Yana Barton.

Nancy Davis, Quadratic Capital CIO

Here is the link to spend time watch videos searched by Google.




Stocks just had their best week of the year as Wall Street bets Jerome Powell will save rally

Here is the link.


State of the Market 2019 | Phil Town

Here is the link.

State of the market 2019


  • America has a strong economy
  • Keep your money in cash
  • Search for wonderful companies
  • Build up your watch list

5:09 - 5:52/ 8:41
Market valuation vs GDP - 20%, the age of Warren Buffet invested more than a few decades ago as a young man.

20% - compared to GDP when Warren Buffet invested

Right now, related to GDP, the price is higher than memory, 175% of GDP.

6:20
Build a watch list of wonderful business - how to do it?

Every 10 years or so, economic storm ...

The moat company will take market share ...

7:34
Most of companies are not selling right now, the price is high.