Skip to content

Welcome to Tech by Example

Menu
  • Home
  • Posts
  • System Design Questions
Menu

Posts

Program to merge two sorted arrays

Posted on January 31, 2022January 31, 2022 by admin

Overview Two arrays are given. Both are sorted First array is of length m+n Second array is of n The objective is to merge these sorted arrays. The first array contains enough…

Program for Power set of a given array of integers

Posted on January 31, 2022January 31, 2022 by admin

Overview An integer array is given which has all unique elements. The objective is to return the power set of that array If the number of elements in the given array is…

Count Possible Decodings of a digit sequence into letters 

Posted on January 31, 2022January 31, 2022 by admin

Overview Let’s say we have below number to letter mapping The objective is to count the number of possible decoding of a given digit sequence Examples Program Here is the program for…

Letter Combinations of a Phone Number Program

Posted on January 31, 2022January 31, 2022 by admin

Overview An input string is given which consists of some digits. The mapping of digits to letters is similar to that of a phone keypad So an input string is given which…

Reverse Words in a sentence

Posted on January 31, 2022January 31, 2022 by admin

Overview The objective is to reverse words in a given sentence Examples Another example. If the input contains a single word then that word will be returned. Here is the strategy First,…

Delete middle node of a linked list

Posted on January 31, 2022January 31, 2022 by admin

Overview The objective is to remove the middle node of the linked list. If x is the size of the linked list then the middle node is Examples Program Here is the…

Remove nth node from the end in a linked list

Posted on January 31, 2022January 31, 2022 by admin

Overview The objective is to remove the nth node from the end of the linked list.  If the size of the linked list is x then nth node from the end is…

Program for Combination Sum Problem

Posted on January 31, 2022January 31, 2022 by admin

Overview Given an integer array and a target number, the objective is to find the number of combinations from the integer array that sum to the target number. Each of the elements…

Program to calculate the power of a number

Posted on January 29, 2022January 29, 2022 by admin

Overview The objective is to calculate the power of a given integer. There will be two inputs The number itself – The number can be positive as well as negative. It can…

Range Sum 2d array program

Posted on January 29, 2022January 29, 2022 by admin

Overview There is a 2d matrix of numbers that is given. The objective Calculate the sum of the elements of matrix inside the rectangle defined by its upper left corner (row1, col1)…

Posts pagination

Previous 1 … 8 9 10 … 16 Next
©2025 Welcome to Tech by Example | Design: Newspaperly WordPress Theme