ARAnindya Royinviruscage.hashnode.dev·May 26, 2024 · 3 min readDifference between vector<> and array() in C++In C++, both vectors and arrays are used to store collections of elements, but they have significant differences in terms of flexibility, functionality, and usage. Here's a comparison of the two: Arrays Static Size: The size of an array must be kno...00
ARAnindya Royinviruscage.hashnode.dev·May 10, 2024 · 1 min readMerge Sort DSA#include <iostream> using namespace std; void merge(int arr[], int left, int mid, int right) { int n1 = mid - left + 1; int n2 = right - mid; int L[n1], R[n2]; for (int i = 0; i < n1; i++) L[i] = arr[left + i]; for (int...00