1.
Given a string, replace the x's by the y's.
Input: string = “abxbxc”.
Output: “abybyc”
2.
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]
3.
What does the encapsulation pillar mean in object-oriented programming?
4.
Given the following string returns the number of uppercase letters in the string taking into account the first lowercase letter.
Input: s = “oneTwoThree”.
output: 3
Explanation: In the string we have 2 uppercase letters (“T, T”) however the string always starts with a lowercase letter so it is taken into account, 2 uppercase + 1 lowercase letter results in 3.
5.
SQL clause used to filter the records in a table based on a specific condition.
6.
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]
7.
What type of SQL queries are used to interact with data stored in a database, allowing operations such as inserting, updating and deleting data in tables?
8.
Given an integer n, return a string array answer where:
answer[i] == “FizzBuzz” if i is divisible by 3 and 5. answer[i] == “Fizz” if i is divisible by 3. answer[i] == “Buzz” if i is divisible by 5. answer[i] == i (as a string) if none of the above conditions are true Input: n = 15
Output: [“1″,”2″,”Fizz”,”4″,”Buzz”,”Fizz”,”7″,”8″,”Fizz”,”Buzz”,”11″,”Fizz”,”13″,”14″,”FizzBuzz”]
9.
What is a relational database?
10.
What is the difference between an abstract class and an interface in OOP?
11.
What is the difference between a class and an object in OOP?
12.
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
13.
What is polymorphism in OOP?
14.
Which of the following SQL statements deletes a record from a table?
15.
What is the pillar of object-oriented programming that promotes code reuse?
16.
What does foreign key mean?
17.
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.
18.
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]
19.
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]
20.
What is inheritance in object-oriented programming and what is its purpose?