Re: [algogeeks] google

2012-04-03 Thread bharath chowdary
sorry dude it came to ITBHU with tag of marketing so i could not be
helpful to u in this case.


On 4/1/12, Deepak Garg deepakgarg...@gmail.com wrote:
 hey guys!

 google is coming to our college, their main requirements is from
 operating systems and computer networks.

 can some one post the sample questions for it..

 thanks
 Deepak

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 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.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
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] Re: Find the maximum boxes which can fit each other?

2012-04-03 Thread Doom
What is wrong with atul's solution of longest decreasing subsequece on 
length after sorting on area? I think the relationship is transitive as 
well.
e.g. box a fits inside b.
box b fits inside c
by transitivity, box a fits inside c.

Isn't this fine?

On Saturday, 24 March 2012 22:25:33 UTC+5:30, Don wrote:

 There is more to it than a longest increasing subsequence because the 
 greater than relationship is not transitive. 
 Don 

 On Mar 24, 3:05 am, atul anand atul.87fri...@gmail.com wrote: 
  ok you need to put box into a box... 
  so first requirnment willl be to sort on the basis of area of box. 
  after this bcoz you are adding one box into another...the box you are 
  putting inside big box ..shud have base length less than a big box or it 
  wont fit in...even if its area is smaller.. 
  now we reduced this problem of finding longest inc subsequence on the 
 basis 
  of base length. 
  On 24 Mar 2012 13:14, Ratan success.rata...@gmail.com wrote: 
  
  
  
   @atul can u plzz describe in detail the algo of modified subsequence 
   prob used here i m nt able to get it ... though tried a lot 
  
   On Sat, Mar 24, 2012 at 1:05 PM, atul anand atul.87fri...@gmail.com 
   wrote: 
it is modified longest increasing subsequence problem.. 
  
On 24 Mar 2012 12:26, Ratan success.rata...@gmail.com wrote: 
  
You are given a lot of cuboid boxes with different length, breadth 
 and 
height. You need to find the maximum subset which can fit into each 
other. 
For example: 
If Box A has LBH as 7 8 9 
If Box B has LBH as 5 6 8 
If Box C has LBH as 5 8 7 
If Box D has LBH as 4 4 4 
then answer is A,B,D 
  
A box can fit into another only and only if all dimensions of that 
 is 
less than the bigger box. Also Rotation of boxes is not possible... 
  
can ny1 suggest a good algo for this? 
  
-- 
-- 
Ratan | 3rd Year | Information Technology | NIT ALLAHABAD 
  
-- 
You received this message because you are subscribed to the Google 
   Groups 
Algorithm Geeks group. 
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. 
  
-- 
You received this message because you are subscribed to the Google 
 Groups 
Algorithm Geeks group. 
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. 
  
   -- 
   -- 
   Ratan | 3rd Year | Information Technology | NIT ALLAHABAD 
  
   -- 
   You received this message because you are subscribed to the Google 
 Groups 
   Algorithm Geeks group. 
   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.- Hide quoted text - 
  
  - Show quoted text -

-- 
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/-/a06lUGOcKvgJ.
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] RBS intern

2012-04-03 Thread Shashank Jain
Hi,

RBS is coming for internship. How do I prepare fr it, in terms of the
topics asked, In terms of the no. of rounds, whether there is a GD or not?

FYI - they hv already taken e-litmus test fr the interns as well (I hv a
good score).


Shashank Jain
IIIrd year
Computer Engineering
Delhi College of Engineering

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
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.



Re: [algogeeks] RBS intern

2012-04-03 Thread rahul sharma
be ready wid puzzles..:D

On Tue, Apr 3, 2012 at 10:17 PM, Shashank Jain shashan...@gmail.com wrote:

 Hi,

 RBS is coming for internship. How do I prepare fr it, in terms of the
 topics asked, In terms of the no. of rounds, whether there is a GD or not?

 FYI - they hv already taken e-litmus test fr the interns as well (I hv a
 good score).


 Shashank Jain
 IIIrd year
 Computer Engineering
 Delhi College of Engineering

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 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.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
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] Doubt on Regular Expression

2012-04-03 Thread Debabrata Das
Hi All,

I was looking for an regular expression such that given a string X,it
should exclude a  token in single quote preceded by a particular
string.

e.g in java say.

String X= 'abc  '   like'abc  ' ='abc'
N.replaceall(reg expression ??) would transform it to : ?? like
'abc  ' =?? ( remove extra space as well but not spaces in single
quote)

Please let me know if you have any doubt.

Thanks,
Debabrata

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
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.



Re: [algogeeks] Re: m*n matrix, sorted rows, sorted columns, WAP to find an element efficiently

2012-04-03 Thread Karthikeyan V.B
Hi,

Start from right top corner
If matrix element  key move to previous column
else if matrix element  key move to next row

int search(int** a,int key,int m,int n)
{
if (key  a[0][0] || key  a[m-1][n-1]) return 0;
int min=a[0][n-1],i=0,j=n-1;
while(i=m-1  j=0)
{
if(a[i][j]  key)
j--;
else if(a[i][j]  key)
i++;
else
return 1;
}
return 0;
}

Regards,
Karthikeyan.V.B

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
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] Given an array A[1..n] of log n bit integers, sort them in-place in O(n) time

2012-04-03 Thread Doom
Any ideas?

-- 
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/-/aGzMcjTFcAYJ.
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.



Re: [algogeeks] Re: m*n matrix, sorted rows, sorted columns, WAP to find an element efficiently

2012-04-03 Thread Ashish Goel
why not start from middle(m/2, n/2)
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652


On Wed, Apr 4, 2012 at 12:29 AM, Karthikeyan V.B kartmu...@gmail.comwrote:

 Hi,

 Start from right top corner
 If matrix element  key move to previous column
 else if matrix element  key move to next row

 int search(int** a,int key,int m,int n)
 {
 if (key  a[0][0] || key  a[m-1][n-1]) return 0;
 int min=a[0][n-1],i=0,j=n-1;
 while(i=m-1  j=0)
 {
 if(a[i][j]  key)
 j--;
 else if(a[i][j]  key)
 i++;
 else
 return 1;
 }
 return 0;
 }

 Regards,
 Karthikeyan.V.B

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 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.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
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] validate bit pattern : MS question

2012-04-03 Thread Ashish Goel
verify that the bits of a number are in format 1s followed by 0s followed
by 1s like 1110001 is valid but 100100100 is not

Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
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.



Re: [algogeeks] Re: m*n matrix, sorted rows, sorted columns, WAP to find an element efficiently

2012-04-03 Thread sanjiv yadav
we can also apply binary search on rows and columns separately by which we
will decide that in which 1/4th part we need to search.So in this case
complexity will be O(log m + log n).

just check and let me know...

On Wed, Apr 4, 2012 at 5:27 AM, Ashish Goel ashg...@gmail.com wrote:

 why not start from middle(m/2, n/2)
 Best Regards
 Ashish Goel
 Think positive and find fuel in failure
 +919985813081
 +919966006652



 On Wed, Apr 4, 2012 at 12:29 AM, Karthikeyan V.B kartmu...@gmail.comwrote:

 Hi,

 Start from right top corner
 If matrix element  key move to previous column
 else if matrix element  key move to next row

 int search(int** a,int key,int m,int n)
 {
 if (key  a[0][0] || key  a[m-1][n-1]) return 0;
 int min=a[0][n-1],i=0,j=n-1;
 while(i=m-1  j=0)
 {
 if(a[i][j]  key)
 j--;
 else if(a[i][j]  key)
 i++;
 else
 return 1;
 }
 return 0;
 }

 Regards,
 Karthikeyan.V.B

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 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.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 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.




-- 
Regards

Sanjiv Yadav

MobNo.-  8050142693

Email Id-  sanjiv2009...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
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.



Re: [algogeeks] validate bit pattern : MS question

2012-04-03 Thread atul anand
This can be done simply by checking and unchecking flag , below code will
work :-

void checkPattern(int n)
{
int cnt=0,flag=1;
if(n1)
{
while(n)
{
if(n1  flag==1)
{
cnt++;
flag=0;
}
else if(!(n1)  flag==0)
{
cnt++;
flag=1;
}
if(cnt  3)
{
break;
}
n=n1;
}
}
if(cnt==3)
printf(\npattern found\n);
else
printf(\nPattern not found\n);
}




On Wed, Apr 4, 2012 at 5:30 AM, Ashish Goel ashg...@gmail.com wrote:

 verify that the bits of a number are in format 1s followed by 0s followed
 by 1s like 1110001 is valid but 100100100 is not

 Best Regards
 Ashish Goel
 Think positive and find fuel in failure
 +919985813081
 +919966006652

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 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.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
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.