Unit 2: Introduction to Array Concepts - Subjective Questions

INT322 — Computing System And Technologies • Practice Questions with Detailed Answers

20 questions

1

Define an array. Explain how a one-dimensional array can be declared and initialized with suitable examples.

2

Explain the memory representation of a one-dimensional array and derive the formula used to calculate the address of an element.

3

What is array traversal? Describe an algorithm for traversing a one-dimensional array and state its complexity.

4

Describe how an element is inserted at a specified position in an array. Include an algorithm and complexity analysis.

5

Explain the deletion of an element from an array. Why is shifting required, and what is the operation's complexity?

6

Define linear search and explain its algorithm, applications, and complexity.

7

Explain binary search with an algorithm. State its prerequisite and derive its time complexity.

8

Compare linear search and binary search.

9

Describe bubble sort with an example and analyze its best- and worst-case complexity.

10

Derive the worst-case number of comparisons performed by bubble sort on an array of elements.

11

Analyze and compare the time complexities of common array operations.

12

Define a stack and explain its basic operations and applications.

13

Explain how an array-based stack is traversed. Why should traversal not modify the value of top?

14

Describe the push operation in an array-based stack, including the overflow test and complexity.

15

Describe the pop operation and distinguish between stack underflow and stack overflow.

16

Define a queue and explain its basic operations and common applications.

17

Explain queue traversal for both a linear queue and a circular queue.

18

Describe the ENQ operation in an array-based linear queue and discuss its overflow condition.

19

Describe the DEQ operation in an array-based queue, including how the queue is reset after its last element is removed.

20

Explain queue underflow and overflow conditions. How does a circular queue improve the use of array space?