answersLogoWhite

0

Difference between vector and array list?

Updated: 4/5/2020
User Avatar

Wiki User

14y ago

Best Answer

Vectors are thread safe but array lists are not. Hence array lists are faster than Vectors.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
User Avatar

Janet Rankawat

Lvl 1
2y ago
Answer to the above question-" difference between array and vectors" is given on website:

Add your answer:

Earn +20 pts
Q: Difference between vector and array list?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Main difference between Array List and Vector in Java?

List is not sync'd as a vector is.


Which is better vector or array list?

It depends... If you want a speedy processing go for array list If you want thread safety go for a vector


What is the difference between array linklist?

Linked list consists of data nodes each pointing to next in the list .An array consist of contiguous chunk memory of predetermined size


What is an ordered list of data structure using c plus plus?

An ordered list of data in any programming language is simply a sorted array or list. In C++ this can either mean a sorted array, vector, list or forward list.


What is difference between array list and character list?

An array list is a collection of one or more (usually more) elements arranged in memory in a consecutive fashion, accessed as one indexable entity. The character list consists of only characters.


C plus plus array-based lists?

If you mean an array where each element is a list, then the STL is your friend. To create an array of lists of any type T, use the following declaration: std::vector<std::list<T>> my_array_of_lists;


Difference between vector and list in c plus plus?

Although they share many of the same features, there are many differences. For instance, a list does not have an index operator [] while a vector does not have a merge method. If in doubt, simply look at the variable's declaration -- it will explicitly state whether the variable is a list or a vector (or indeed some other STL container), along with the type of data that it contains. Ultimately a vector is just an array, ideally suited to random access, whereas a list is ideally suited to sequential access.


What is a array in math?

An array is a computer science equivalent of a vector in mathematics. Both contain a list of data.


What is the difference between queues and circular queues?

A queue can use a dynamic array, or a linked list, but if using static memory, the queue becomes a circular queue because the underlaying data structure is a static circular array. This means the ends of the array are attached.


Can Array-based lists can never be empty?

It's either an array or it's a list, it cannot be both. However, an empty array is entirely possible: std::vector<int> my_vector; // an empty array my_vector.push_back(42); // an array of 1 element my_vector.push_back(1); // an array of 2 elements my_vector.clear(); // an empty array An empty list is also possible: std::list<int> my_list; // an empty list my_list.push_back(42); // a list of 1 element my_list.push_back(1); // a list of 2 elements my_list.clear(); // an empty list The same thing can be done in C: int* my_array = nullptr; // an empty array my_array = malloc (2*sizeof(int)); // an array of 2 elements my_array[0] = 42; my_array[1] = 1; free my_array; // an empty array my_array = 0;


What is the difference between list and an outline?

What is the difference between a list and an outlin?


What is difference between a list and an outline?

What is the difference between a list and an outlin?