function highest

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Tue Feb 05, 2013 6:33 am

function highest

Postby raghu1910 » Tue Feb 05, 2013 6:43 am

Write a function Array_high which will receive one parameter as an Array of array of integer values, and it should return an array value indexed by Keys ("highest_val" and "highest_count") with values as the Highest integer value and the highest number of elements in sub arrays.
For example, with the input value {{2,3},{2}, {1,2,3,4},{5,6,2,1,3,10}}, the "highest_val" is 10 and "highest_count" is 6, and the return array should be:
$arr['highest_val']= 10;
$arr['highest_count'] = 6;

php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Re: function highest

Postby seandisanti » Thu Feb 07, 2013 12:28 pm

Show some of your code where you've attempted and failed. nobody wants to just do your homework for you.

Return to “PHP coding => General”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 11 guests