1.
What is a relational database?
2.
What is the SQL query to select all records in a table named "customers"?
3.
Given an array of integers, returns a new array with unique elements eliminating duplicates.
Input: arr = [23,4,5,7,4,23,8]
Output: [23, 4, 5, 7, 8]
4.
SQL clause used to filter the records in a table based on a specific condition.
5.
What is the difference between a class and an object in OOP?
6.
Access modifier that only allows access within the class and child classes.
7.
Given the following array of integers return the first number that is greater than 10.
Input: arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
Output: 11
8.
It is the pillar of object-oriented programming that consists of identifying the essential characteristics of an object and its relevant behaviors, omitting non-essential details.
9.
Given the following array of integers sort them in descending order.
Input: arr = [10, 5, 2, 8, 7, 1, 9, 6, 3, 4]
Output: [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
10.
What does the encapsulation pillar mean in object-oriented programming?
11.
Given two arrays, one with the exchange rates between two currencies and one with the amounts in the original currency, return an array with the amounts converted to the final currency.
Input: rates = [1.15, 0.85] currencies = [100, 200]
Output: [115, 170]
12.
What does foreign key mean?
13.
Given an array of countries and another array with capitals returns a new array with country-capital pairs.
Input: countries = [“Mexico”, “Spain”, “United States”]
capitals = [“Ciudad de México”, “Madrid”, “Washington D.C.”]
Output:
[ [ ‘Mexico’, ‘Ciudad de México’ ], [ ‘Spain’, ‘Madrid’ ], [ ‘United States’, ‘Washington D.C.’ ] ]
14.
Given the following array of integers sort them in ascending order using the bubble sort algorithm
Input: arr = [5, 3, 7, 1, 9, 2]
Output: [1, 2, 3, 5, 7, 9]
15.
Reverses the following string.
Input: “Hello World”.
Output: “dlroW olleH”.
16.
Given a string, replace the x's by the y's.
Input: string = “abxbxc”.
Output: “abybyc”
17.
What is inheritance in object-oriented programming and what is its purpose?
18.
SQL query fetching unique records from a "city" column in a "customers" table?
19.
Given the following array and an integer, return the indices of 2 numbers that sum to the given integer.
Input: nums = [2,7,11,15] target = 9
Output: [0,1]
Explanation: The sum of position 0 and 1 of the array return as result 9. 2 + 7 = 9
20.
What is an interface in object-oriented programming?