Flipkart Interview Question for SDE-2s


Country: United States




Comment hidden because of low score. Click to expand.
1
of 1 vote

Class Cell  {
	---  Responsible Each individual cell of the game board
}
Class Board  {
	--- Class responsible for Drawing Board 
	--- Draw() method with taken NumCol and NumRow as input for 
		Drawing the Board with Cell[][]
}
Class Player  {
	--- Class for mainting Players 
	--- constructor taking Number of players as input for Multi Player support
	--- If no of player is not supplied, then create one player vs Computer
}
Class GameState  {
	--- To keep track of state of the Game
	--- Evaluate() method to check if somebody won the game becasue of a move made 
}

Class Game  {
	--- Responsible for Overrall control of the Game
	--- Keep track the Moves made by Player
	--- GamePlay() method taking care of rotation of players for their respective Turn
}

Putting out these details to the interviewer, you can start discussing what all detaisl are required and
keep evolving the design.

- R@M3$H.N November 20, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 2 vote

how to understand "multi-player" ?

- zr.roman November 19, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

more than one player :D

- Iuri Sitinschi November 20, 2015 | Flag


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More