1.
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]
2.
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.
3.
Given the following SOS string, certain letters are altered and do not give the SOS message, return the number of SOS letters that have been altered.
Input: s = “SOSSPSSQSSOR”.
Output: 3
Explanation: In some SOS of the string there is a letter that has been modified which are “P, Q, R” so there are 3 letters that modified the SOS.
4.
What is the function of the constructor method in OOP?
5.
Given the following array of integers, sort it in ascending order using the quick sort algorithm
Input: arr = [5, 3, 7, 1, 9, 2]
Output: [1, 2, 3, 5, 7, 9]
6.
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
7.
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
8.
What is polymorphism in OOP?
9.
Which SQL query updates the name of a customer with ID 123 in a table "customers"?
10.
What is the pillar of object-oriented programming that promotes code reuse?
11.
Given a string, returns the number of vowels in the string.
Input: s = ” Hello, how are you?”.
Output: 7
12.
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]
13.
What is a relational database?
14.
Given a string, replace the x's by the y's.
Input: string = “abxbxc”.
Output: “abybyc”
15.
Given the following array of integers, returns the smaller number.
Input: arr = [23,456,89,1,34]
Output: 1
16.
What does foreign key mean?
17.
What is an interface in object-oriented programming?
18.
What is the SQL query to select all records in a table named "customers"?
19.
What does the encapsulation pillar mean in object-oriented programming?
20.
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.’ ] ]