Re: [algogeeks] TIC TAC TOE

2011-07-28 Thread ~*~VICKY~*~
You can collect all winning combinations and store them separately and check whether each of them have occured! The complexity will be T(n) = O(no of possible winning combinations) On Thu, Jul 28, 2011 at 7:16 PM, amit karmakar wrote: > Will the given game configuration always be a completed game

Re: [algogeeks] TIC TAC TOE

2011-07-28 Thread amit karmakar
Will the given game configuration always be a completed game i.e no more moves can be done? On Thu, Jul 28, 2011 at 7:10 PM, radha krishnan < radhakrishnance...@gmail.com> wrote: > Excuse me MR.balaji :P > U got selected for Microsoft Redmond :P still preparing ? :P > > On Thu, Jul 28, 2011 at 6:

Re: [algogeeks] TIC TAC TOE

2011-07-28 Thread radha krishnan
Excuse me MR.balaji :P U got selected for Microsoft Redmond :P still preparing ? :P On Thu, Jul 28, 2011 at 6:01 AM, Balaji S wrote: > Given a 3X3 matrix , with 1's 0's and -1's ( 1 is player one 0 is player two > -1 is none) > > how ll you find who is the winner / draw in a tic tac toe game in t

[algogeeks] TIC TAC TOE

2011-07-28 Thread Balaji S
Given a 3X3 matrix , with 1's 0's and -1's ( 1 is player one 0 is player two -1 is none) how ll you find who is the winner / draw in a tic tac toe game in the most effiecient manner... -- With Regards, Balaji.S -- You received this message because you are subscribed to the Google Groups "

Re: [algogeeks] Tic Tac Toe

2011-06-16 Thread sunny agrawal
i think u r missing the cases when o is winning and and countx > counto then answer should be no On Fri, Jun 17, 2011 at 12:19 PM, KK wrote: > https://www.spoj.pl/problems/TOE1/ > For which test case does this program fail > > > #include > #include > using namespace std; > > bool isWin(vect

[algogeeks] Tic Tac Toe

2011-06-16 Thread KK
https://www.spoj.pl/problems/TOE1/ For which test case does this program fail #include #include using namespace std; bool isWin(vector< vector > &v, char ch); int main() { vector col(3); vector< vector > v(3, col); int t, i, j; bool x, o; cin >> t; while(t--) {

[algogeeks] tic-tac-toe in a distributed environment

2011-01-12 Thread DIPANKAR DUTTA
1) write a program to play tic-tac-toe in a distributed environment.The two players will be playing from different machines.. 2)write a program for real time video broadcasting by using RTP protocol? could u help me by sending the codes of any of those problem? -- DIP

Re: [algogeeks] tic tac toe

2011-01-09 Thread nishaanth
"someone" - going by the exact words of the problem description. Just see all the 8 possible winning combinations(row,column, 2 diagonals)...if anyone combination is filled by the same player..then there is a winner. I know it sounds trivial, correct me if i am wrong. On Sat, Jan 8, 2011 at 11:1

[algogeeks] tic tac toe

2011-01-08 Thread divya
Design an algorithm to figure out if someone has won in a game of tic- tac-toe. give O(N) soln -- 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, se