Category: Interview Questions

Interview Questions

Interview Questions

Recursion

Recursion Infinite Recursion Recursion with base case Print name 5 times Print from 1 to N (Recursion) Print from N to 1 (Recursion) Backtracking Logic Print from 1 to N (Backtracking) Print from N to 1 (Backtracking) Parametrised and Functional Recursion Parametrized Problem-1 : Sum of first N numbers using recursion Functional Problem-2: Sum of […]

Mary Jane 
Interview Questions

Template for System Design Interview

Introduction Clarification Questions (Scope) Back of the envelope estimates (Metrics) Functional Requirements Non functional Requirements 1. Scalability 2. Availability 3. Reliability (Partition Tolerance) 4. Consistency API’s High Level Design Low Level Design Verification Please visit https: https://codeandalgo.com for more such contents.

Mary Jane 
Distributed System
Interview Questions

System Design Concepts

System Design Concepts Scalability Problem Statement How to design system that can handle millions of request at once ? To answer this we will start with simple solution Single server design Separating Server and Database Horizontal vs Vertical Scaling Vertical Scaling Horizontal Scaling FailOver Strategies Scaling the Database Failover servers : Cold Standby Failover servers […]

Mary Jane 
Interview Questions

Count occurrences of Anagrams

Count occurrences of Anagrams Problem Statement Anagram is a word, phrase, or sentence formed from another by rearranging its letters.Given two strings pattern and input. Find out the number of anagrams of pattern in input.Exampleinput := “abc cab a pq bca s acb a yerfxyasz”pattern := “abc “ Golang Code Output Complexity This implementation is […]

Mary Jane 
Interview Questions

Anagram

Anagram What is an Anagram? An anagram is a word or phrase formed by rearranging the letters of another word or phrase, typically using all the original letters exactly once. Example Group Anagrams Group Anagrams involves taking a list of words and grouping them into subsets of anagrams. Input Output Here, Logic Golang code Output

Mary Jane 
Interview Questions

LRU Cache

LRU Cache Explanation Example Run This implementation provides O(1) complexity for both Get and Put operations using the doubly linked list and map combination. Please visit https: https://codeandalgo.com for more such contents

Mary Jane 
Interview Questions

Find the Kth Largest Integer in the Array

Leetcode#1985 Find the Kth Largest Integer in the Array Problem Statement You are given an array of strings nums and an integer k. Each string in nums represents an integer without leading zeros. Return the string that represents the kth largest integer in nums. Note: Duplicate numbers should be counted distinctly. For example, if nums is [“1″,”2″,”2”], “2” is the first largest integer, “2” is the second-largest integer, and “1” is the third-largest integer. […]

Mary Jane