This term refers to bundling data and methods that operate on the data into a single unit
What is encapsulation?
int x = 5;
int y = 10;
if (x * 2 == y) {
System.out.println("Equal");
} else {
System.out.println("Not Equal");
}
What is "Equal"?
This British mathematician and logician is known as the father of modern computing
Who is Alan Turing?
This algorithm is used to sort a list by repeatedly comparing and swapping adjacent elements
What is bubble sort?
This technique scrambles data to make it unreadable to unauthorized users
What is encryption?
This special method is used to initialize an object (OOP)
What is a constructor?
public class Main {
public static void main(String[] args) {
ArrayList<String> fruits = new ArrayList<>();
fruits.add("Apple");
fruits.add("Banana");
fruits.add("Cherry");
System.out.println(fruits.get(1));
}
}
What is Banana?
This company created the first commercially successful microprocessor
What is Intel?
This searching algorithm works on sorted data by repeatedly dividing the search interval in half
What is binary search?
This type of attack systematically attempts every possible combination of characters to crack a password
What is a brute force attack?
The index of the last element in an array with 5 elements
What is 4?
arr = [3, 1, 4, 1, 5]
for i in range(len(arr) - 1, -1, -1):
print(arr[i], end=" ")
What is "5 1 4 1 3"?
This company introduced the first personal computer with a GUI, the Lisa in 1983
What is Apple?
This algorithm efficiently sorts data by dividing the list into halves, sorting each half, and then merging them back together
What is merge sort?
This malicious software locks users out of their systems or data until a monetary payment is paid
What is ransomware?
In Python, this function can be used to iterate over both the index and value of a list simultaneously
What is enumerate()?
my_dict = {'a': 1, 'b': 2, 'c': 3}
for key, value in my_dict.items():
if value % 2 == 0:
print(key, end=" ")
What is "b"?
Developed in 1969 at Bell Labs, this operating system became the foundation for Linux and macOS
What is Unix?
This divide-and-conquer sorting algorithm uses a pivot to partition data into smaller subarrays
What is quicksort?
This type of malicious software disguises itself as a legitimate program to trick users into installing it
What is a Trojan horse?
In Java, this is the process of redefining a method in a subclass while accessing it through a superclass reference
What is method overriding?
Find the time complexity?
public void printElements(int[] arr) {
for (int i = 0; i < arr.length; i++) {
System.out.println(arr[i]);
}
}
What is O(n)?
This scientist introduced the stored-program concept, forming the basis of modern computer architecture
Who is John von Neumann?
This algorithm finds the shortest path between nodes in a graph using a priority queue
What is Dijkstra's algorithm?
This type of attack intercepts and alters communications between two parties without their knowledge
What is a man-in-the-middle (MITM) attack?