Battleship

A board can be divided in two halves which are to be given to two players and then you need to add ships for each players. Every player will get a chance to hit at any random point by missile and if it hits the opponent's ship, the ship will get destroyed. The players wins if all ships of its opponent are destroyed. Restrictions - You can hit missile at the same point two times in a game

CodingNinjas
author
2y

Solved using binary search on 2D plane

Help your peers!
Add answer anonymously...
PhonePe Software Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter