Question 53Asked in DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 2 (1:00 PM)

Suppose there are n elements in an array. If we want to delete the beginning element of an array, then how many shift operations are required to fill the…

Suppose there are n elements in an array. If we want to delete the beginning element of an array, then how many shift operations are required to fill the gap left by the deleted element?
  1. An*(n − 1)/2
  2. Bn − 1
  3. C1
  4. Dn²
Show answerHide answer

Correct answer: (B) n − 1

Explanation

After deleting a[0], each of the remaining n - 1 elements must move one position left, so n - 1 shift operations are needed.

From DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 2 (1:00 PM)

This is question 53 of DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 2 (1:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.