Jump to content
MakeWebGames

Simple problem solving


Spudinski

Recommended Posts

This is a small test I have created, with use of other tests around the net.

This one will specifically attain to solving real-world problems that developers face each day.

Furthermore, I'm trying to keep the tasks as simple as possible - so, don't post answers, if you would like to have your answer reviewed PM me.

Task 1

Given a database, and two tables called "skills" and "user" .

"skills" holds three columns, "id", "label" and "value".

"user" holds four columns, "id", "name", "email" "skill_ref".

Now, write a MySQL query to retrieve the user's "name" with the third highest skill number("value") for the skill with a "label" of "agility".

No PHP is required.

Task 2

Given an array, with an undetermined set of elements which could be an array themselves, holding only integer values:

Create a function called findMin($int_arr), that will find the smallest integer throughout the 2-dimentional array.

Sample input:

$int_arr = array(4,90,array(7,3),4);

 

Output should be:

3

 

Feel free to ask questions and discuss.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...