Author: Mary Jane

Kubernetes basic concepts in 5 mins
Interview Questions

Kubernetes basic concepts in 5 mins

Kubernetes basic concepts in 5 mins Create new Kubernetes project Config file for creating cluster e.g. It contains one master and two worker/slave node. Command to create a cluster named ‘local’ Verification of new nodes created on kubernetes Install kubectl Option-1 to install kubectl Option-2 to install kubectl Check all the nodes / machines present […]

Mary Jane 
Spotify System Design interview
Interview Questions

Spotify System Design interview

Spotify System Design Interview Functional Requirement Reduced scope Non Functional Requirement Metrics Database Design We need to maintain below types of data tables i.e User, Artist Song’s metadata and actual song data. Below 3 parameters decides which db to be used. Here, metadata can be modified, queried frequently, so SQL db makes sense. Raw data […]

Mary Jane 
Interview Questions

Change Data Capture (CDC)

Problem Statement Change Data Capture Imagine you’re designing the architecture of Instagram. When users visit a profile, they need to instantly see who this person follows. Approach & potential issues This requires querying a database table containing follower-followed relationships. To make this lookup fast, we need an index on the follower column. But here’s the […]

Mary Jane 
Interview Questions

CAP Theorem

Introduction CAP Theorem In database theory, the CAP theorem, also named Brewer’s theorem after computer scientist Eric Brewer, states that any distributed data store can provide only two of the following three guarantees. Consistency Availability Partition Tolerance What to do when network partition failure occurs ? When a network partition failure happens, it must be decided to do one of the following. Option A […]

Mary Jane 
Interview Questions

Min Stack

Leetcode#155 Min Stack Problem Statement Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. Implement the MinStack class: You must implement a solution with O(1) time complexity for each function. Example 1: Constraints: Logic / Trick Two Stack Since we want to achieve time complexity of O(1) for all operations, we can […]

Mary Jane 
Interview Questions

Longest Palindromic Substring

Leetcode#5 Longest Palindromic Substring Problem statement Given a string s, return the longest palindromic substring in s. Example 1: Input: s = “babad” Output: “bab” Explanation: “aba” is also a valid answer. Example 2: Input: s = “cbbd” Output: “bb” Constraints: Golang solution 1 Time Complexity: O(n2) Space complexity : O(n) Space Complexity Analysis Overall Space Complexity: where O(n) comes […]

Mary Jane 
Interview Questions

Group Anagrams

Leetcode#49 Group Anagrams Problem Statement Given an array of strings strs, group the anagrams together. You can return the answer in any order. Example 1: Input: strs = [“eat”,”tea”,”tan”,”ate”,”nat”,”bat”] Output: [[“bat”],[“nat”,”tan”],[“ate”,”eat”,”tea”]] Explanation: Example 2: Input: strs = [“”] Output: [[“”]] Example 3: Input: strs = [“a”] Output: [[“a”]] Constraints: Simple Approach Output Optimised solution Output Please visit https: https://codeandalgo.com for more such contents.

Mary Jane 
Interview Questions

Multiply Strings

Leetcode#43 Problem Statement Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string. Note: You must not use any built-in BigInteger library or convert the inputs to integer directly. Constraints: Logic To solve this problem optimally, you can use an approach inspired by manual multiplication, employing a digit-by-digit multiplication method. Here’s […]

Mary Jane