Given a 2D board containing 'X' and 'O', capture all regions surrounded by
'X'.
A region is captured by flipping all 'O's into 'X's in that surrounded
region .
For example,
X X X X
X O O X
X X O X
X O X X
After running your function, the board should be:
X X X X
X X X X
X X X X
X O X X
--
Given a 2D board containing 'X' and 'O', capture all regions surrounded by
'X'.
A region is captured by flipping all 'O's into 'X's in that surrounded
region .
For example,
X X X X
X O O X
X X O X
X O X X
After running your function, the board should be:
X X X X
X X X X
X X X X
X O X X
--
WELL PLACED BALLS
There are W identical white balls, B identical black balls and C
containers. We need to distribute all the balls into some of the
containers. A selection is done by randomly picking a container followed by
randomly picking a ball in it. We need to maximise the probability of
1049 and 1098
On Sat, Aug 6, 2011 at 11:09 PM, aditi garg aditi.garg.6...@gmail.comwrote:
CHAR A[10][15] AND INT B[10][15] IS DEFINED
WHAT'S THE ADDRESS OF A[3][4] AND B[3][4]
IF ADDRESS OF A IS OX1000 AND B IS 0X2000
--
You received this message because you are subscribed to the Google
Lvalue assigment error.
On Sat, Aug 6, 2011 at 4:05 PM, Rajesh Kumar testalgori...@gmail.comwrote:
How to remove error in this code?
#includestdio.h
main()
{
int i=10,j=15;
if(i%2=j%3)
printf(\ncharacter);
}
--
Regards
Rajesh Kumar
--
You received this message because you are
funny:)
On Wed, Aug 3, 2011 at 1:25 AM, UTKARSH SRIVASTAV
usrivastav...@gmail.comwrote:
hi I got intern in google ...but i was not able to do some question of
written paper
1.
main()
{
printf(hello);
}
OUTPUT- hello
Why the output is coming hello?
2. Who developed C
array size is 5. so 5*4(size of int)=20.
On Wed, Aug 3, 2011 at 1:45 AM, Anuj kumar anonymize...@gmail.com wrote:
#includestdio.h
#includeconio.h
int main()
{
int arr[5];
printf(%d %d\n,sizeof(arr),sizeof(arr));
getch();
return 0;
}
o/p 204
anybody can tell me how 20
this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Cheers,
Ram
--
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
kadane's algo...google it
On Fri, Jul 29, 2011 at 12:52 PM, SAMMM somnath.nit...@gmail.com wrote:
Do u want the subarray consisting of consecutive elements ???
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
checking for anagrams itself will work for this question...
by using an array[[256];
On Wed, Jul 27, 2011 at 2:52 AM, SkRiPt KiDdIe anuragmsi...@gmail.comwrote:
I dint get wat are you speaking of.each alphabet is mapped onto
ascii_val-'a' ie ascii of a=97. now check for odd and even occurence
op:abc.. \c is not an escape sequence
On Tue, Jul 26, 2011 at 10:17 PM, aditi garg aditi.garg.6...@gmail.comwrote:
what will be the output fr this??
printf(ab\c);
On Tue, Jul 26, 2011 at 6:22 PM, swetha rahul swetharahu...@gmail.comwrote:
Dipankar, Thanks!!!
On Tue, Jul 26, 2011 at
ya it would ignore \ alone..
On Tue, Jul 26, 2011 at 10:27 PM, aditi garg aditi.garg.6...@gmail.comwrote:
ya thats wat my doubt was...if its not a recognised escape sequence thn how
is it interpreted??
Would the compiler jst ignore ''\''?
On Tue, Jul 26, 2011 at 10:25 PM, Ram CEG honest
#includeiostream
using namespace std;
int main()
{
char s[100];
gets(s);
coutsendl;
int a[256]={0};
char *ptr=s;
while(*ptr!='\0')
{
a[(int)*ptr]+=1;
ptr++;
}
char s1[100];
this find whether two strings are anagrams!
--
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.
ya it depends on an individual's visualisation...
On Wed, Jul 20, 2011 at 1:59 AM, radha krishnan
radhakrishnance...@gmail.com wrote:
i think we should not use the answer from otherr ppl for these type of
questions ! This is design ! we have to think of ur own :P
--
You received this
On 16/03/2011, arjoo kumar 2009ar...@gmail.com wrote:
arjookumar2009ar...@gmail.com
On 3/13/11, Srinivas Baravatula prodi...@gmail.com wrote:
-- Forwarded message --
From: ZEAL DECESSUS zealg...@gmail.com
Date: Sun, Mar 13, 2011 at 12:15 PM
Subject: Fwd: Fw: Fwd: : PLEASE
.
--
Thanks Regards
Ram Narayan Das
mob: +91 9177711195
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr
how we can access 2nd element of an struct defined as
struct {
int a;
flaot b;
}
we have given a void pointer of this struct. we dont know what is the
structre only knows 2nd element is a flaot type.
--
Thanks Regards
Ram Narayan Das
mob: +91 9177711195
--
You received this message because
, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Thanks Regards
Ram Narayan Das
mob: +91 9177711195
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com
.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Thanks Regards
Ram Narayan Das
mob: +91 9177711195
--
You received this message
%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Thanks Regards
Ram Narayan Das
mob: +91 9177711195
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
.
--
Thanks Regards
Ram Narayan Das
mob: +91 9177711195
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr
;
}
}
}
On Thu, Aug 19, 2010 at 7:00 PM, ram das ramnaraya...@gmail.com wrote:
shiftZeroOne(int *arr,int size)
{
int odd=1,even=0;
while(odd = size even =size)
{
if ( arr[even] != 1 )
even+=2;
if ( arr[odd] != 0 )
odd
Given an array of 0s and 1s in any order, find the longest sequence
that has equal number of 0s and 1s.
0 0 0 0 1 1 1 1 0 0 //array
0 1 2 3 4 5 6 7 8 9 //index
ans1 (0,7)
ans2 (1,8)
ans3 (2,9)
all having 4 0's and 4 1's
--
Regards,
Ramkumar.G
--
You received this message
Consider there are N players who have a round robin tournament.
input is a data structure which says who won the match for every pair i ,
j i != j .
write an algo to give a sequence A[1...n] such that for ever i , i th player
lost to i+1 th player and won against i-1 th player.
--
Regards,
The question is to find the no of structures possible for a BST which is
directly given bycomputing the catalan number for n(no of nodes)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
DONT DO A BFS!! NOT WORTH IT! CALL THE NEW POINTER AS 'SIDE' POINTER.
for every root connect its left and right, for every root connect
root-right and root-SIDE-left
that ll do
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
@sharad
BST is not unique, anyway the formula is correct
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
@abaove : sorry the formula stated prev is wrong. is (2n Cn)/(n+1) or
(2n!)/(n+1)!*n!
both being the same.
refer catalan numbers
--
Ramkumar.G
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
] On
Behalf Of Rohit Saraf
Sent: 13 June 2010 08:19
To: algogeeks@googlegroups.com
Subject: Re: [algogeeks] c array
@ram : i guess you have used some longer string and not strings
btw.. what is Mingw ?
gcc/g++ is not mingw, i guess
--
Rohit
not eight ;hence the error
--
ram
From: algogeeks@googlegroups.com [mailto:algoge...@googlegroups.com] On
Behalf Of sharad kumar
Sent: 13 June 2010 07:59
To: algogeeks@googlegroups.com
Subject: Re: [algogeeks] c array
hey array indexing starts from 0 rite??
then y shld u get overflow in first
31 matches
Mail list logo