Home / MCQ Bank / Computer
Computer Advanced Trees (Avl, Redblack, Btrees)

What is a time complexity for finding the longest substring that is common in string S1 and S2 (n1 and n2 are the string lengths of strings s1, s2 respectively)?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option D • Ɵ (n1 + n2)

Related Computer Questions

What will be the output of the following Java program? interface calculate { void cal(int item); } class displayA implements calculate { int x; public void cal(int item) { x = item * item; } } class displayB implements calculate { int x; public void cal(int item) { x = item / item; } } class interfaces { public static void main(String args[]) { displayA arr1 = new displayA; displayB arr2 = new displayB; arr1.x = 0; arr2.x = 0; arr1.cal(2); arr2.cal(2); System.out.print(arr1.x + " " + arr2.x); } } The generic two-level data warehouse architecture includes which of the following? The expression builder is an access tool that controls an expression___ for entering an expression Off-line operation is the operation of devices without the control of Which of the following statements are correct about an array? 1. The array int num[26]; can store 26 elements. 2. The expression num[1] designates the very first element in the array. 3. It is necessary to initialize the array at the time of declaration. 4. The declaration num[SIZE] is allowed if SIZE is a macro.