array

0-1 Knapsack Problem (Dynamic Programming) - MyTechiest

Given the weights and profits of ‘N’ items, we are asked to put these items in a knapsack which has a capacity ‘C’. The goal is to get the maximum profit from the items in the knapsack. Each item can only be selected once, as w…

Linked List vs Arrays | Data Structures | MyTechiest

The main difference between   arrays   and   linked lists   is memory allocation. An   array   instantiates a fixed block of memory based on the size we define in its declaration. On the other hand,  linked lists  can access or…

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…

Introduction to Multidimensional Arrays - MyTechiest

Introduction to Multidimensional Arrays In this blog, we will move towards the advanced concepts of arrays, i.e,  multidimensional arrays . A two–dimensional array is the simplest form of a multidimensional array. We can see a tw…

Introduction to Array Data Structure - MyTechiest

Introduction to Array An array is a collection of items of the same type stored contiguously in memory. It is the simplest and most widely used Data Structure. Most of the other data structures for example  stack  and  queues  …

تحميل المزيد من المشاركات
لم يتم العثور على أي نتائج