-
8 Patterns Review For Successful Coding Interview
8 Patterns Review For Successful Coding Interview This is nothing but quick 5 min revision before going to interview. Visit https: https://codeandalgo.com for more such contents
-
Design an ATM Machine
Leetcode#2241 Design an ATM Machine When withdrawing, the machine prioritizes using banknotes of larger values. Implement the ATM class: Example 1: Constraints: Golang Code Output Please visit https: https://codeandalgo.com for more such contents.
-
Design Authentication Manager
Leetcode#1797 Problem Statement There is an authentication system that works with authentication tokens. For each session, the user will receive a new authentication token that will expire timeToLive seconds after the currentTime. If the token is renewed, the expiry time will be extended to expire timeToLive seconds after the (potentially different) currentTime. Implement the AuthenticationManager class: Note that if a token expires at time t, and…
-
Top 7 Most Used Distributed System Patterns
1. Ambassador
-
Design Browser History
Leetcode#1472 Problem Statement You have a browser of one tab where you start on the homepage and you can visit another url, get back in the history number of steps or move forward in the history number of steps. Implement the BrowserHistory class: Example Constraints: Logic Golang Code Output Optimised Solution Please visit https: https://codeandalgo.com for more such contents.
-
Design Memory Allocator
Leetcode#2502 Problem Statement You are given an integer n representing the size of a 0-indexed memory array. All memory units are initially free. You have a memory allocator with the following functionalities: Note that: Implement the Allocator class: Example 1: Input [“Allocator”, “allocate”, “allocate”, “allocate”, “freeMemory”, “allocate”, “allocate”, “allocate”, “freeMemory”, “allocate”, “freeMemory”] [[10], [1, 1], [1, 2], [1, 3], [2], [3, 4],…
-
Design Twitter
Leetcode#355 Problem Statement Design a simplified version of Twitter where users can post tweets, follow/unfollow another user, and is able to see the 10 most recent tweets in the user’s news feed. Implement the Twitter class: Example 1: Input [“Twitter”, “postTweet”, “getNewsFeed”, “follow”, “postTweet”, “getNewsFeed”, “unfollow”, “getNewsFeed”] [[], [1, 5], [1], [1, 2], [2, 6], [1], [1, 2], [1]]…