Skip to content

Welcome to Tech by Example

Menu
  • Home
  • Posts
  • System Design Questions
Menu

Posts

Program to Reverse vowels of a string

Posted on July 19, 2022July 19, 2022 by admin

Overview A string is given. The objective is to reverse all vowels in that string Example 1 Example 2 Program Below is the program for the same Output: Also, check out our…

Determine Whether Matrix Can Be Obtained By Rotation

Posted on July 19, 2022July 19, 2022 by admin

Overview Two n*n matrices are given source and target. We have to determine whether the source matrix can be converted to the target matrix by doing 90-degree rotations any number of times…

Detonate the maximum bombs program

Posted on July 17, 2022July 17, 2022 by admin

Overview A 2d array  is given where each entry in an  array has three values i- Denotes the x coordinates of the bomb j – Denotes the y  coordinates of the  bomb…

Rotting Oranges Program

Posted on July 17, 2022July 17, 2022 by admin

Overview An m*n matrix is given where each entry contains three values 0 – Denotes that entry is empty 1 – Denotes that entry contains fresh orange 2 – Denotes that the…

Count unreachable pair of nodes in an undirected graph

Posted on July 15, 2022July 15, 2022 by admin

Overview An integer n is given. There are n  nodes numbered 0 to n-1.  A 2D integer array edges is also given where edges[i] = [ai, bi] means that there is an…

Find the number which appears once in an array

Posted on July 14, 2022July 14, 2022 by admin

Overview An array is given in which every element is present twice except one element. The objective is to find that element in constant extra space Example 1 Example 2 The idea…

Majority element in an array

Posted on June 6, 2022June 6, 2022 by admin

Overview The objective is to find the majority element in a given array. A majority element is an element that occurs more than n/2 times in a given array where n is…

Unique ID Generation System Design

Posted on May 28, 2022May 28, 2022 by admin

Overview Distributed Systems are a norm these days. Sometimes there is a requirement to generate Unique IDs across such distributed systems. Some of these unique ID requirements could be There is Order…

Program for Binary Search in a sorted array

Posted on May 28, 2022May 28, 2022 by admin

Overview Idea is to do a binary search of a given target element in an input array. If the target element is present then output the index. If the output element is…

Pastebin System Design

Posted on May 7, 2022May 8, 2022 by admin

Overview First, let’s look at the definition of Pastebin.  Pastebin service allows you to share text and images over a link which can be shared with multiple users. So basically Pastebin is…

Posts pagination

Previous 1 … 4 5 6 … 16 Next
©2025 Welcome to Tech by Example | Design: Newspaperly WordPress Theme