What is the difference between an array and vector?
Answer / Himanshu Dwivedi
An array is a data structure that stores multiple elements of any data type in contiguous memory locations, where each element can be individually accessed using an index. On the other hand, a vector is a type of array provided by C++ Standard Template Library (STL), which automatically manages the size of the array and can grow or shrink as needed.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is complexity algorithm?
What is a stable sort?
Write the programs for Linked List (Insertion and Deletion) operations
9 Answers College School Exams Tests, Persistent, TCS,
What do u mean by data type?
How can we reverse the order in the treemap?
Why set will not allow duplicates?
Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements.
You are given a singly linked list. How would you find out if it contains a loop or not without using temporary space?
What is circular queue example?
Is tuple immutable?
What is difference between static and dynamic array?
What is Insertion sort, selection sort, bubble sort( basic differences among the functionality of the three sorts and not the exact algorithms)?