Hassan Raza Test
Hassan Raza Test
SQL skills
Private notes to share with your team...
C++ skills
Open-ended answers
Recommendation
In this MySQL challenge, your query should return the rows from your table where LastName = Smith or FirstName = Robert and the rows should be
sorted by Age in ascending order. Your output should look like the following table.
SELECT * FROM maintable_N72ZJ where FirstName = "Robert" or LastName = "Smith" order by Age asc
. SQL Contains Letter SQL 10/10
You can share this report with people via the URL above Save PDF
In this MySQL challenge, your query should return the number of rows from your table where FirstName contains "e" and LastName has more than 5
characters. Your output should look like the following table.
SELECT count(*) FROM maintable_732W4 where FirstName Like '%e%' and length(LastName) > 5
Have the function ArrayAddition(arr) take the array of numbers stored in arr and return the string true if any combination of numbers in the array
(excluding the largest number) can be added up to equal the largest number in the array, otherwise return the string false. For example: if arr contains
[4, 6, 23, 10, 1, 3] the output should return true because 4 + 6 + 10 + 3 = 23. The array will not be empty, will not contain all the same elements, and may
contain negative numbers.
int largest_number = 0;
largest_number = arr[i];
int temp;
temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
int sumOfNumber = 0;
sumOfNumber = 0;
sumOfNumber +=arr[j];
if(sumOfNumber == largest_number)
flag = true;
break;
return flag;
int main(void) {
return 0;
}
Leaving tab: this user left the page the following times during this challenge
You can share this report with people via the URL above Save PDF
06/07/21, 10:27am
06/07/21, 10:39am
06/07/21, 11:30am
Have the function ArithGeo(arr) take the array of numbers stored in arr and return the string "Arithmetic" if the sequence follows an arithmetic
pattern or return "Geometric" if it follows a geometric pattern. If the sequence doesn't follow either pattern return -1. An arithmetic sequence is one
where the difference between each of the numbers is consistent, where as in a geometric sequence, each term after the first is multiplied by some
constant or common ratio. Arithmetic example: [2, 4, 6, 8] and Geometric example: [2, 6, 18, 54]. Negative numbers may be entered as parameters, 0 will
not be entered, and no array will contain all the same elements.
int arth=0,geo=0;
bool ar=false,g=false;
arth=arr[1]-arr[0];
geo = arr[1]/arr[0];
ar = false;
if(arr[i]+arth == arr[i+1])
ar = true;
g=false;
g=true;
if(ar)
return "Arithmetic";
else if(g)
return "Geometric";
else
return "-1";
int main(void) {
return 0;
Video recordings
SQL Sort Ages
Video 1
Array Addition
Video 1 2
Arith Geo
Video 1
Open-ended answers
1. How many years of experience do you have as a software engineer?
You can share this report with people via the URL above Save PDF
N/A
2. What was the last piece of software you worked on? What did you specifically build?
N/A