which of the following are the linear data structures

arrays lists stack queues
arrays lists stack graphs
queue stack trees arrays
arrays stack maps trees

The linear data structures among the given options are:

1) Arrays
2) Lists (assuming it refers to linked lists)
3) Stacks
4) Queues

The linear data structures among the given options are arrays, lists, stack, and queue.

Arrays: Arrays are a collection of elements of the same data type, where each element is accessed using an index.

Lists: Lists are an ordered collection of elements, where each element contains a reference to the next element, forming a sequence.

Stack: A stack is a Last-In-First-Out (LIFO) data structure, where elements are inserted and removed from the same end, known as the top.

Queue: A queue is a First-In-First-Out (FIFO) data structure, where elements are inserted at the rear and removed from the front.

Therefore, the linear data structures among the given options are arrays, lists, stack, and queue.

To determine which of the given options are linear data structures, let's first understand what a linear data structure is.

A linear data structure organizes its elements in a sequential manner, where each element is linked to its previous and/or next element. The elements are accessed and processed in a specific order. Some common examples of linear data structures include arrays, lists, stacks, and queues.

Let's assess each option:

1. Arrays, lists, stack, queues:
- Arrays: Yes, arrays are linear data structures as elements are stored in contiguous memory locations.
- Lists: Yes, lists (like linked lists) are also linear data structures as elements are connected through pointers or references.
- Stack: Yes, a stack is a linear data structure as elements are organized in a linear order and follow the Last-In-First-Out (LIFO) principle.
- Queue: Yes, a queue is a linear data structure as elements are arranged in a linear order and follow the First-In-First-Out (FIFO) principle.

2. Arrays, lists, stack, graphs:
- Graphs: No, graphs are not linear data structures. Graphs represent connections between elements, but they are not organized linearly.

3. Queue, stack, trees, arrays:
- Trees: Yes, trees can also be considered linear data structures if they are arranged in a sequential order (e.g., binary tree). Each node in a tree has a parent and zero or more children, defining a hierarchical relationship. However, if the tree allows multiple children for each node (e.g., n-ary tree), it is not considered linear.
- Queue: Yes, a queue is a linear data structure.
- Stack: Yes, a stack is a linear data structure.
- Arrays: Yes, arrays are linear data structures.

4. Arrays, stack, maps, trees:
- Maps: No, maps (or dictionaries) are not linear data structures. They store elements as key-value pairs, without a defined linear order.

Based on the assessment, the following options include only linear data structures:
1. Arrays, lists, stack, queues
3. Queues, stack, trees, arrays

Please note that the answer may vary depending on how these data structures are implemented or defined in specific programming languages or contexts.