GATEverse
← GATE CSE 2006

Q54

MCQ2 marks, −0.5

Given two arrays of numbers a1,...,ana_{1},...,a_{n} and b1,...,bnb_{1},...,b_{n} where each number is 00 or 11, the fastest algorithm to find the largest span (i,j)(i, j) such that ai+ai+1+⋯+aj=bi+bi+1+⋯+bj a_{i}+a_{i+1}+\dots+a_{j}=b_{i}+b_{i+1}+\dots+b_{j} or report that there is not such span,

Sign in to save attempts.

Loading…