dsa

Unbounded Knapsack Problem (Dynamic Programming) - MyTechiest

Given two integer arrays to represent weights and profits of ‘N’ items, we need to find a subset of these items which will give us maximum profit such that their cumulative weight is not more than a given number ‘C’. We can ass…

Introduction to Singly Linked List - MyTechiest

Introduction to Singly Linked List A Linked-list is another data structure in C++ formed by  nodes  that are linked together like a chain. Each node holds data, along with a pointer to the next node in the list. The type of linke…

Find Two Numbers that Add up to "value" - MyTechiest

T akes an array  arr , a number  value  and  size  of the array as input and returns an array of two numbers that add up to  value . In case there is more than one pair in the array containing numbers that add up to  value , you…

Merge Two Sorted Arrays - MyTechiest

In this problem, We are going to merge two sorted arrays. Sample Input arr1  =   [ 1 , 3 , 4 , 5 ]    arr2  =   [ 2 , 6 , 7 , 8 ] Sample Output  # arr  =   [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ] int * mergeArrays(int arr1[], int arr…

Remove Even Integers From an Array - MyTechiest

It is a simple array-based based problem in which you need to remove all the even elements from the given array. Sample Input  Arr  =   [ 1 , 2 , 4 , 5 , 10 , 6 , 3 ] Sample Output  Arr  =   [ 1 , 5 , 3 ] Output int * removeEve…

Load More
That is All