Re: [algogeeks] Re: Interview Question

2012-08-17 Thread Hraday Sharma
# lengthy explanation give more attention
#here we are finding sums on all valid partition and storing all four 
possible sums in variable a,b,c,d and and for all possible a,b,c,d we will 
keep runninf  max and min/
 
lets take an example parttion is done at row=0, coloumn=1
 
00 01| 02 03
|-
10 11| 12 13
20 21| 21  22
 
a=arr[0][0]+arr[0][1]
b=arr[0][2]+arr[0][3]
c=arr[1][0]+arr[1][1]+arr[2][0][2][1]
d=arr[1][2]+arr[1][3]+arr[2][1]+arr[2][2];
 
this can be coded like this

int a,b,c,d,max,main;
a=b=c=d=max=min=0;
for(int row=0;row++;row
> @sahil Can you please explain your question with an example ? 

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/COUmpAUCe20J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] what is priority inversion ?

2012-08-08 Thread Hraday Sharma
i just read about priority inversion , how does it take place ?
i read it in Galvin , it wasnt clear there.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/5aVHrwEsiewJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] what will be output for this program ?

2012-07-27 Thread Hraday Sharma


#include
 int main(){
printf("%d %d\n", 32<<1, 32<<0);
printf("%d %d\n", 32<<-1, 32<<-0);
printf("%d %d\n", 32>>1, 32>>0);
printf("%d %d\n", 32>>-1, 32>>-0);
return 0;


-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/oJogPmV-5msJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] flipkart question

2012-07-07 Thread Hraday Sharma
You are given 2 dice. Both are fair. One of the dice has no numbers printed 
on it. You have to label the unmarked dice such that when both the dice are 
thrown, the sum on the faces is evenly distributed between 1 and 12 .


-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/uXBWN7DSu_gJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.