1.
What is a primary key in a database?
2.
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.’ ] ]
3.
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.
4.
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]
5.
What is the pillar of object-oriented programming that promotes code reuse?
6.
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
7.
What is the SQL query to select all records in a table named "customers"?
8.
SQL clause used to filter the records in a table based on a specific condition.
9.
Given the following array of integers, sort it in ascending order using the insertion sort algorithm.
Input: arr = [56,89,45,34,90]
Output: [34,45,56,89,90]
10.
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]
11.
Reverses the following string.
Input: “Hello World”.
Output: “dlroW olleH”.
12.
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
13.
Given the following array of integers, returns the smaller number.
Input: arr = [23,456,89,1,34]
Output: 1
14.
Which SQL query updates the name of a customer with ID 123 in a table "customers"?
15.
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]
16.
Given a string, returns the number of vowels in the string.
Input: s = ” Hello, how are you?”.
Output: 7
17.
What is a relational database?
18.
What is polymorphism in OOP?
19.
What is the difference between an abstract class and an interface in OOP?
20.
SQL query fetching unique records from a "city" column in a "customers" table?