Showing posts sorted by relevance for query catalan number. Sort by date Show all posts
Showing posts sorted by relevance for query catalan number. Sort by date Show all posts

Monday, May 8, 2017

Catalan number wiki article

May 8, 2017

Introduction


It is very interesting to study catalan number again. This time Julia likes to go over the wiki article and then try to get better understanding the algorithm.

Tonight she had mocking experience to learn an algorithm - find maximum number of path from bottom-left corner to top-right corner, and do not cross the diagonal line. In other words, always stay underneath the diagonal line. She learned that the algorithm is similar to Catalan number.

Catalan number 



Sunday, January 21, 2018

Catalan number

January 21, 2018

Introduction


It was another 10:00 PM mock interview again. I had to write the algorithm called catalan number. After I finished coding, the peer asked me if I can make an array copy instead of writing a for loop. So I looked up Array.Copy and then used it first time in mock interview.

Code review


Here is the C# code.

Saturday, January 27, 2018

Catalan number

January 27, 2018


Introduction


It is another mock interview and I had to work on the algorithm related to Catalan number. This time the peer dropped a hint, do not need to use previous row, only use current row and then save the space. I wrote the code based on his advice.

Algorithm 


Here is the code based on the advice from the peer.


Wednesday, August 30, 2017

Catalan number

August 30, 2017

Introduction


It is the classical algorithm and also I like to practice again and again. It is called Catalan number. When I am tired, my brain stops working partially but I do not know which part. Today, I had a mocking practice starting from 10:00 pm, and I was very tired after one day coding at work, and then I asked the peer which one is row and which is column. I looked at the graph and I did not know where the row is. The peer told me that row should be horizontal. You see, when I am tired, I still can tell quickly the horizontal and vertical, but I could not tell which is row and column. I have to ask the peer and get some assumption based on the common sense.

I practiced the algorithm before more than once, one time I was the interviewer and one time I was the interviewee.

Algorithm


Here is C# practice. I wrote the code to pass all test cases in my first writing.


Actionable Items


Try to figure out the tough situation, when I am tired and physical sleepy, after one day work, 10:00 pm, what is my best strategy to work with peers to solve data structure and algorithm problems.

Yesterday I booked 10:00 pm mocking, but at 9:30 pm, I laid on bed to read wechat and fell asleep, when I woke up, it was 10:10 pm, I missed the mocking practice.

Never lay down and I should sit up and keep myself wake until 10:00 pm.


Wednesday, January 17, 2018

Catalan number

January 17, 2018

Introduction



It is the algorithm peer gave it to me for a test since he had the algorithm the day before. I had to work on the algorithm called Catalan number on January 15, 2018, 10:00 mock interview. I explained the algorithm to the peer, and also showed last 3 practices.

Will write down the discussion of the algorithm here later.

Tuesday, November 28, 2017

Catalan number

Nov. 28, 2017

Introduction


It only takes 20 minutes to work on Catalan number algorithm. And then surprisingly, the peer asked me to reduce the space from O(n2) to O(n). The peer said that since you finished early, still 10 minutes left.

Code study 


C# code in practice is here.

Tuesday, September 12, 2017

Catalan number (II)

Sept. 12, 2017

Introduction


It is the classical algorithm to calculate the catalan number. My last practice is documented here. It is very challenge to work with the peer and I ran into the index out of range error in my first writing, and then I modified the code, and argued that first row and first column should exclude from the double for loop, and discuss first row and first column separately.

I need to work on the algorithm problem solving, need to look into the feedback.

Algorithm practice 


C# practice code is here which passes all test cases. 


From the above feedback, I did not communicate very well this time. Need to figure out how to clarify of my answers and line of reasoning. 


Follow up 


January 17, 2018

It is the first time I know how to review my own past practice. Missing the analysis of the algorithm writing is a big issue for me now, production ready code should be written with some analysis and time complexity and space complexity. I have to write down the algorithm, and constraints, and the requirement, what problem to solve. And also my analysis of the problem, solve it on a simple example, go over the example to explain to the peer first. And make sure that the peer understands the problem.

From the transcript of the practice, I did not write any analysis of the algorithm. That is not good practice at all.

The peer did complain and I should have let peer know the algorithm and how to solve it first using a simple example. 

Sunday, February 18, 2018

Catalan number

Feb. 18, 2018

Introduction


It is my favorite quote saying that practice until you cannot get it wrong. On Feb. 17, 2018 I practiced the algorithm Catalan number but I got it wrong.

I had some issue with understanding n-grid.

Code review


I will look into the issue later. Here is the C# code.

Thursday, April 8, 2021

Algorithms | system design | a list created by anonymous | Leetcode, Facebook offer

April 8, 2021

FB | London | Offer

Here is the link. 

 

Data Structure - LLDs - ( 1 Week )

List of data structures


  • Lists


Algorithms - Analysis Time and Space - ( 3 Weeks )


  • Sorting  - 2 Days


  • Radix Sort - Maximum Gap

  • Topological sort - Covered in Graphs


  • Divide-and-Conquer - 2 Days

  • The substitution method for solving recurrences

  • The recursion-tree method for solving recurrences

  • The master method for solving recurrences




  • Graph Algorithms - 6 Days

Leetcode Pattern 1 | DFS + BFS == 25% of the problems






Concepts Problems and Maths - ( 1 Week )




Networks - ( 1 Week )

Leetcode

  • Network Topology, OSI Architecture

  • TCP/IP models

  • TCP and UDP

  • Firewall, DNS, Domains, workgroups

  • Protocols i.e ICMP


OS - ( 1 week )

Operating System Tutorial
Shared Memory Systems


  • Cache

  • Multithreading

  • Producers-consumers problem

  • Dining philosophers problem

  • Cigarette smokers problem

  • Readers–writers problem

  • Web Crawler Multithreaded

  • Scheduling algorithms

  • Deadlock

  • Virtual Memory

  • Mutex and semaphore

  • Kernels

  • Paging

Software Design Principles - ( 2 weeks )

System Design Primer


Start learning about Theory of Distributed Systems?

Challenges with distributed systems

Microservices Design Guide 👨‍🏫 - Platform Engineer


Cloud design patterns - Azure Architecture Center

Design patterns for microservices | Azure Blog and Updates


TO READ:

Domain Driven Design (DDD) | Bounded Context (BC) | Polyglot Persistence (PP)| Command and Query Responsibility Segregation (CQRS) | Command Query Separation (CQS) | Event-Sourcing (ES) | CAP Theorem | Eventual Consistency | Twelve-Factor App | SOLID Principles |


Just some things to focus on.

  • Load balancer

  • API gateway

  • Microservices - Scale Cube Concept, MVC - READ

  • Database Sharding

  • SQL vs NoSQL - Cassandra, Postgres, Hadoop, Data lake, other algorithms related to data lake, CAP Theorem


Leadership Principles - LPs - ( 1 Week )

TO BE UPDATED


Resume and Miscellaneous

#ADD WHATEVER YOU HAVE PUT IN RESUME


  • Algos you have mentioned

  • Project work and related references to read

  • Achievements and information about it


REFERENCES

Introduction to Algorithms - Cormen

Leetcode