ISC · Computer Science · Arrays
Practice question
3 marksOriginal Khojo Papers practice question written to the ISC Computer Science syllabus — not from a past board or specimen paper.
State two differences between linear search and binary search.
ISC · Computer Science · Arrays
Original Khojo Papers practice question written to the ISC Computer Science syllabus — not from a past board or specimen paper.
State two differences between linear search and binary search.
Only on this page: it is kept if you say you got it wrong, so you can compare later.
Watch a teacher solve this on the board, step by step, with voice. Then ask about any step.
No checked answer or marking scheme for this question yet.
Its answer has not been reviewed. The AI Examiner marks only questions that have an official marking scheme or an answer a teacher has reviewed.
From the same topic and chapter, at a similar level.
Write a Java program segment to find the average of the elements of an integer array a of size n.
Arrays
What happens in Java if a program accesses a[10] in an array declared as int a[] = new int[10]?
Arrays
Write a Java program segment to find the largest element of a one-dimensional integer array a of size n.
Arrays
How many comparisons does binary search need in the worst case to find an element in a sorted array of 1,024 elements?
Arrays
Explain the ternary operator in Java and rewrite "if (a > b) max = a; else max = b;" using it.
Operators and Expressions in Java
What is the output of: String s = "Examination"; System.out.println(s.length() + " " + s.substring(0, 4) + " " + s.toUpperCase().charAt(2));
String Handling