Coding Interview Patterns
Interview Questions

Coding Interview Patterns: 8 Must-Know Techniques for Success (2025 Guide)

Coding interview patterns are the key to cracking technical interviews at top tech companies. In this guide, you’ll quickly review 8 essential ones in 5 minutes. Summary:This blog is your 5-minute last-minute revision sheet covering 8 essential coding patterns that consistently appear in top tech interviews. From two pointers to topological sort, this is the […]

prakashsinghabody@gmail.com 
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 […]

prakashsinghabody@gmail.com 
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 […]

prakashsinghabody@gmail.com 
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 […]

prakashsinghabody@gmail.com 
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 […]

prakashsinghabody@gmail.com 
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.

prakashsinghabody@gmail.com 
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 […]

prakashsinghabody@gmail.com