Skip to content

Latest commit

 

History

History

0x0A-primegame

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

0x0A. Prime Game

For this project, you will need to leverage your understanding of prime numbers, game theory, and algorithm optimization to solve a competitive game scenario. The challenge involves determining the winner of a game based on the strategic removal of prime numbers and their multiples from a set of consecutive integers.

Concepts Needed:

  1. Prime Numbers:

    • Understanding what prime numbers are.
    • Efficient algorithms for identifying prime numbers within a range.
  2. Sieve of Eratosthenes:

    • An efficient algorithm for finding all prime numbers up to any given limit, which can be particularly useful for this task.
  3. Game Theory:

    • Basic principles of competitive games where players take turns and the concept of optimal play.
    • Understanding win conditions and strategies that lead to a win or loss.
  4. Dynamic Programming/Memoization:

    • Using previous results to make future calculations faster, potentially necessary for optimizing the solution for multiple rounds of the game.
  5. Python Programming:

    • Loops and conditional statements for implementing game logic and algorithms.
    • Arrays and lists for storing the integers and tracking removed numbers.

Resources:

By grasping these concepts and making use of the recommended resources, you will be well-equipped to approach the problem with a solid understanding of both the mathematical and programming challenges involved. The key to success in this project lies in applying efficient algorithms to manage the game’s state and making optimal decisions based on the game’s rules.

Additional Resources

- [Mock Technical Interview](https://www.youtube.com/watch?feature=shared&v=Jw2pniZCLi8)

Requirements

General

  • Allowed editors: vi, vim, emacs
  • All your files will be interpreted/compiled on Ubuntu 20.04 LTS using python3 (version 3.4.3)
  • All your files should end with a new line
  • The first line of all your files should be exactly #!/usr/bin/python3
  • A README.md file, at the root of the folder of the project, is mandatory
  • Your code should use the PEP 8 style (version 1.7.x)
  • All your files must be executable