Computer Science - Algorithms - Insertion sort - Insertion Sort Tracing

P1: 'Array [4,3,2,1]. After i=1 (key=3), array is:' → [___, 4, 2, 1] [3]. P2: 'Array [2,3,4,1]. For key=1, how many shifts?' → ___ [3 - shift 4,3,2 all right]. P3: 'Best case input for insertion sort?' → Already ___ array [sorted]. P4: 'Inner while loop condition' → while j >= 0 and arr[j] ___ key:

Edodovivmagarwal
Computer Science - Algorithms - Insertion sort - Insertion Sort Tracing
Log in

Preparing your experience...

Loading scripts and resources

Comments (0)

0/5000

Comments are reviewed before appearing publicly.

About this Experience

Computer Science - Algorithms - Insertion sort - Insertion Sort Tracing

vivmagarwal
vivmagarwalJan 29, 2026

Description

P1: 'Array [4,3,2,1]. After i=1 (key=3), array is:' → [___, 4, 2, 1] [3]. P2: 'Array [2,3,4,1]. For key=1, how many shifts?' → ___ [3 - shift 4,3,2 all right]. P3: 'Best case input for insertion sort?' → Already ___ array [sorted]. P4: 'Inner while loop condition' → while j >= 0 and arr[j] ___ key:

Details

Computer ScienceAlgorithmsClass 10, Class 10, Grade 10, Stage 10, MYP Year 5

Engagement

9

Likes

0

Remixes

0

Comments