Can somebody help me out with this algo in PHP with their code.

+1 vote
82 views

loop for all S in this F
find each S highest value
keep this in a hashset1 (key=S, value= max value)
order each S value in increasing order
keep this in another hashsset2 (key = S, value = list of values)
end loop for all S

order hashset1 in increasing order

loop hashset1
pick up each S
loop hashset2

pick up each element (roll no, plies, values)
show that on screen

end loop hashset2

end loop hashset1

// Code is most welcome... Literally have worked with this but couldn't break the jinx with their key-value.

posted Mar 20, 2014
Looking for an answer?  Promote on:

Too cyptic language, could not understand anything.
Can you be step by step what you are trying to achieve, what is the code, what is the output and what is expected.
Similar Questions

where is the problem in this code???,,,,,

``````#include<stdio.h>
#define EOS '\0'
int islet(char c)
{

if(c>='a'&& c<='c')return(1);
else
return(0);
}

int main()
{
char c,inpstr[]="abbbbccccb";
int q,i,j;
int count=0;
printf("%s",inpstr);
q=1;
i=0;

c=inpstr[i];

while(c!=EOS)
{
if(q==1 && (inpstr[0]=='a')){q=2;}
else  if(q==2 && (inpstr[i>=1 ||i<=19]=='b')&& islet(c) )
{q=2;}
else if(q==2 &&(inpstr[i]=='c') && islet(c)){
count++;
if(count>1){printf("%d",count);}

else
{q=3;}
}
else if(q==3 && (inpstr[0]=='b')){q=4;}
else{
q=5;
break;
}
c=inpstr[i++];
}

if(q==5){
printf("illegal");}
else{
printf("legal");
}

return(0);
}
``````