LLD 2- Strategy Design Pattern

Q1) what is the design pattern Ans: Design Patterns are the typical solutions to commonly occurring problems in software design. They are like pre-made blueprints that you can customize to solve a recurring design problem in your code. using these object-oriented programming principles we design manageable, scalable, reusable software. Q2) where to use Strategy Design … Read more

DSA General Pattern In JS

1. Trie Implement Trie (prefix Tree) LeetCode 2. DSU number-of-islands 3. Segment Tree Range Sum Query Mutable 4. DFS number-of-islands 5. BFS populating-next-right-pointers-in-each-node 6. Binary Search find-minimum-in-rotated-sorted-array 7. Sliding Window a) Fixed Sliding Window sliding window maximum b) Variable Size Sliding Window longest-substring-without-repeating-characters 8. Stack next-greater-element-ii 9. Recursion 10. Dynamic Programming 11. Tree 12. Two … Read more

Chapter 09- Optimizing Our App

Modulararity means we have broken down our code in meaningful peaces Functional Component: Function that return some JSX. Hooks peace of JS code that extract some logic whenever you leaving the page you should clear the event lister or other trash you created in your component Optimize React App

Chapter 08: let’s get classy

Sequence of different life cycle method execute in class component Q1) order of life cycle method execute in class based component having child as well React execute Component in 2 phase see above link Q2) order of life cycle method if parent has 2 child component in parallel Q3) why you can not write callback … Read more

HLD 4: Microservice Design Pattern

Database per service SAGA Pattern SAGA is Sequence of Local transaction aak event trigger karta hai for success for next process and failure event trigger karta hai for previous service local transaction if it’s local transaction get failed Type of SAGA Pattern 2. orchestration-based: orchestrator sab kuch manage karta hai s1, s2, s3 event kai … Read more

SOLID Principles

S: Single Responsibility PrincipleO: Open / Close (Open for extension i.e using inheritance or composition and Closed for Modification)L: Liskov Substitution ( substitutability:- You should be able to use a child class in place of its parent class)I: Interface Segregation(A Class should not depend on methods that it does not need to implement)D: Dependency Inversion: … Read more

HLD 3 – Microservices Design Pattern

Microservices and monolithicMonolithic: legacy application, all features in one application Disadvantage 1. overload IDE (code intelliJ, ide pai load karna muskil ho jata hai 2. scaling is very hard (just for fixing one line bug u need to deploy whole application) 3. it is very tight couple( pura system test karna parega for checking minute … Read more

HLD 2- CAP theorem

this is a desirable property of distributed system with replicated dataC: consistency, sabhi jagah same data rahna chahiye (i.e DB node B, DB node C is in sync)A: Availibility, ateast server response karna chahiye P: Partition Tolerance: (DB Node B and DB Node C partition ho gya hai fir bhi …. system up hai, user … Read more