Question: Suppose A is a 0-indexed nn array. We choose a coordinate (i, j) with all coordinates equally [20 pts] likely. We delete all elements in
Suppose A is a 0-indexed nn array. We choose a coordinate (i, j) with all coordinates equally [20 pts] likely. We delete all elements in row i and all elements in column j. When we do this, all elements in the lower left (if any) shift up (one shift per element), all elements in the upper right (if any) shift left (one shift per element), and all elements in the lower right (if any) shift up and left (two shifts per element). If each shift takes one second how long do we expect the deletion to take? Simplify your final (polynomial) expression
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
