Computer Knowledge

Data Structures and Algorithms

1,518 Questions

Data Structures and Algorithms form the core of computer science, focusing on arrays, linked lists, trees, and sorting mechanisms. These concepts are essential for solving complex computational problems efficiently. Test takers preparing for technical and administrative IT exams will find these questions highly relevant.

Array OperationsLinked List ApplicationsSorting AlgorithmsTree Data StructuresMultilevel IndexingAlgorithm Time Complexity

Data Structures and Algorithms Questions

Multiple choice
  1. There is a native VLAN mismatch.

  2. The link between Switch1 and Switch2 is up but not trunked.

  3. The is not properly configured for inter-VLAN routing.

  4. VLAN 50 is not allowed to entering the trunk between Switch1 and Switch2.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

If Computer A can communicate with Computer B (likely on the same switch) but not with C or D (on the other switch), the trunk link between switches isn't carrying VLAN 50 traffic. By default, trunks carry all VLANs unless explicitly restricted. If VLAN 50 was previously removed from the allowed list or the trunk wasn't properly configured, inter-switch communication for that VLAN fails. Native VLAN mismatch (A) would cause different errors. A non-trunked link (B) wouldn't allow any VLAN traffic to pass.

Multiple choice
  1. backtracking

  2. greedy

  3. dynamic programing

  4. linear programing

  5. divide and conquer

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

Divide and Conquer is an algorithm design paradigm, based on recursion and is used for the Quicksort in which the original problem is divided in to the sub problems and are solved recursively.

Multiple choice
  1. Each node has the maximum of M children and a minimum of M/2 children or any number from 2 to the maximum.

  2. Each node has one fewer keys than children with the maximum of M -1 keys.

  3. Keys are arranged in a defined order within the node.

  4. All the leaves are on the same level, i.e. there is no empty sub tree above the level of the leaves.

  5. All the leaves have been connected to form the linked list of the keys in a sequential order.

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

This is the Property of B-Tree.

Multiple choice
  1. Piping

  2. PDU

  3. Streaming

  4. Multiplexing

  5. Encapsulation

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Multiplexing is the process of interleaving multiple data streams onto a single communication channel, which matches the description of data interleaving. The other options are incorrect: piping refers to data transfer between processes, PDU is protocol data unit (a data structure), streaming is continuous media delivery, and encapsulation is wrapping data with protocol headers.

Multiple choice
  1. LIFO linear data structure

  2. FIFO linear data structure

  3. LIFO non-linear data structure

  4. FIFO non-linear data structure

  5. GIGO non-linear data structure

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

A queue is a First-In-First-Out (FIFO) data structure. In a FIFO data structure, the first element added to the queue will be the first one to be removed.. A queue is an example of a linear data structure, or more abstractly a sequential collection.

Multiple choice
  1. Recursive languages are undecidable.

  2. Recursive languages are a recursive subset in the set of all possible words over the alphabet of the language.

  3. Recursive languages are closed under set difference operation.

  4. Recursive languages are closed under complementation.

  5. Recursive languages are closed under union.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A formal language is recursive if there exists a total turing machine (a turing machine that halts for every given input) that, when given a finite sequence of symbols from the alphabet of the language as input (any string containing only characters in the language's alphabet) accepts only those that are part of the language and rejects all other strings. Recursive languages are also called decidable.