Question

The wildly popular game Fortfite has been massively successful in the past year, and they’re looking...

The wildly popular game Fortfite has been massively successful in the past year, and they’re looking toexpand their staff. As a Gator Software Engineer, you want to jump on this great opportunity! Seeing asyou’re a UF graduate, AwesomeGames immediately schedules an interview with you. During theinterview, the interviewer asks how you would handle adding and removing players from games considering the following conditions:

Each game has at most 100 players within it. This actual number is locked as soon as the match begins.

The players are initially loaded up in order by highest to lowest score (best player at #1 spot, worst player at #100 spot).

As players are eliminated, they get removed from the game. This happens could happen at any time during the match, and players should be removed immediately. Assume resizing adds no extra time.

Because of how massive the game is and how many people are playing it at a single time (numerous matches could be running on a single server), your interviewer needs your solution to be efficient. You have been given a list of data structures, and the interviewer asks you to describe the pros and cons of using each one, and whether or not it would be a suitable choice.

 Array

 Dynamic Array

 Vector

 Stack

 Linked List

0 0
Add a comment Improve this question Transcribed image text
Answer #1

=>Array:-

Pros:-

1.) We can access array element fastly as location can be computed easily.

2.) Direct indexing is possible in array with time complexity of O(1).

Cons:-

1.) Insertion and deletion in array slows the computation as we have to shift adjacent element.

2.) Large block is needed to hold the array.

=>Dynamic Array:-

Pros:-

1.) Dynamic array gives direct access to elements without making copies.

2. ) Dynamic array size automatically grows when insertion is made and size is not present.

Cons:-

1.) It is an array whose size is fixed when array is allocated.

2.) Insertion and deletion of element is slow.

=>Vector:-

Pros:-

1,) Size of vector can be changed.

2.) We can easily delete elements from vector.

Cons:-

1.) Memory consumption is more in vector as vector is an object.

=>Stack:-

Pros:-

1.) LIFO is possible in stack which is not possible with Linked List and array.

2.) stack is used as temporary variables and it get destroys when function is no longer needed.

Cons:-

1.) Memory in stack is limited.

2.) When number of object creation increases in stack then it results in stack overflow.

=>Linked list:-

Pros:-

1.) Insertion and deletion of data is easier as it does not allow shifting of data.

2.) Sequential Access is possible in linked list with a time complexity of O(N).

Cons:-

1.) Linked list requires more memory.

2.) Direct access is not possible only sequential access is possible.

Add a comment
Know the answer?
Add Answer to:
The wildly popular game Fortfite has been massively successful in the past year, and they’re looking...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C++ program This program involves writing a VERY simplified version of the card game War. You...

    C++ program This program involves writing a VERY simplified version of the card game War. You may know this game or not but my rules are these 1. Split the deck between player1 and player2. Only the face values matter (2-14) and not the suits 2. Each player puts a card down on the table. The higher face value wins that hand. If the card values match, you will simply indicate tie and neither player wins.The original rules would require...

  • C++ Project - Create a memory game in c++ using structs and pointers. For this exercise,...

    C++ Project - Create a memory game in c++ using structs and pointers. For this exercise, you will create a simple version of the Memory Game. You will again be working with multiple functions and arrays. You will be using pointers for your arrays and you must use a struct to store the move and pass it to functions as needed. Program Design You may want to create two different 4x4 arrays. One to store the symbols the player is...

  • Due to your experience in designing the database for the "Legendary League" game, you have been...

    Due to your experience in designing the database for the "Legendary League" game, you have been asked to design the ER diagram for a bigger database to manage the events for the "Legendary League" eSports Oceanic Championship (OC). The requirements are as follows: Registered teams compete in the OC. Each team has a name, and a number of team members. A team also maintains a rank throughout the OC, reflecting how well it is doing in the championship. Team members...

  • I am creating a MATLAB game for my school project. The goal of the game is...

    I am creating a MATLAB game for my school project. The goal of the game is to create a 'Treasure Hunt Game' that asks the user to input the number of players, the difficult (easy, medium, or hard), and asks the user(s) to pick spots on a matrix until the correct spot is chosen, therefore winning the game. If a player misses the spot, the command window doesn't show how far away the treasure is, but what direction it is...

  • C#: Implement a multiplayer Battleship game with AI The rules are the same as before. The...

    C#: Implement a multiplayer Battleship game with AI The rules are the same as before. The game is played on an NxN grid. Each player will place a specified collection of ships: The ships will vary in length (size) from 2 to 5; There can be any number or any size ship. There may be no ships of a particular size; EXCEPT the battleship – which there will always be 1 and only 1. Player order will be random but...

  • For a C program hangman game: Create the function int play_game [play_game ( Game *g )]...

    For a C program hangman game: Create the function int play_game [play_game ( Game *g )] for a C program hangman game. (The existing code for other functions and the program is below, along with what the function needs to do) (Also the link to program files (hangman.h and library file) is below the existing code section. You can use that to check if the code works) What int play_game needs to do mostly involves calling other functions you've already...

  • Please, I need help with program c++. This is a chutes and ladders program. The code...

    Please, I need help with program c++. This is a chutes and ladders program. The code must be a novel code to the specifications of the problem statement. Thank you very much. Assignment Overview This program will implement a variation of the game “chutes and ladders” or “snakes and ladders:” https://en.wikipedia.org/wiki/Snakes_and_Ladders#Gameplay. Just like in the original game, landing on certain squares will jump the player ahead or behind. In this case, you are trying to reach to bottom of the...

  • Overview In this exercise you are going to recreate the classic game of hangman. Your program...

    Overview In this exercise you are going to recreate the classic game of hangman. Your program will randomly pick from a pool of words for the user who will guess letters in order to figure out the word. The user will have a limited number of wrong guesses to complete the puzzle or lose the round. Though if the user answers before running out of wrong answers, they win. Requirements Rules The program will use 10 to 15 words as...

  • I need a basic program in C to modify my program with the following instructions: Create...

    I need a basic program in C to modify my program with the following instructions: Create a program in C that will: Add an option 4 to your menu for "Play Bingo" -read in a bingo call (e,g, B6, I17, G57, G65) -checks to see if the bingo call read in is valid (i.e., G65 is not valid) -marks all the boards that have the bingo call -checks to see if there is a winner, for our purposes winning means...

  • Your life as a college basketball coach used to be fairly easy, since it was based...

    Your life as a college basketball coach used to be fairly easy, since it was based on just one principle—get the most talented players. A few months every year, you and your army of assistants and scouts would comb the country, looking high and low for the best players, and convincing them that your program was where they belonged. And even if recruiting didn’t go your way one year, you could expect that the players you did get would be...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT