subject
Computers and Technology, 10.12.2021 19:20 nick607

A company registers an IPO on a website sellshares. com. All the shares on this website are available for bidding for a particular time frame called the bidding window. At the end of the bidding window an auction logic is used to decide how many of the available shares go to which bidder until all the shares that are available have been allotted, or all the bidders have received the shares they bid for, whichever comes earlier. The bids arrive from the users in the form of until the bidding window is closed. The auction logic assigns shares to the bidders as follows: 1. The bidder with the highest price gets the number of shares they bid for 2. If multiple bidders have bid at the same price, the bidders are assigned shares as follows: Each bidder in the same price group gets assigned one share each consecutively, with each bidder being arranged inside the group based on their timestamp. Once a bidder gets the number of shares they bid for, they will be removed from the above iterative process and the process which then continues until all bidders are removed or the shares get exhausted, whichever comes first. List the user ld's of all users who did not get even one share after the shares have been allocated. For example, bids come in as bids = [[1, 5, 5, 0], [2, 7, 8, 11, 13,7,5, 13, 14, 10, 3, 3]]. There are totalShares = 18 to allocate. The highest price bid is for user ld 2 for 7 shares at a price of 8, so that user gets 7 shares leaving 11 to allocate to lower prices. Users with ld's 1 and 3 each bid 5 for 5 and 7 shares, with bidder 1 having the earlier timestamp. After 5 iterations, 10 shares have been allocated with 5 shares going to each of these two bidders. Bidder 1 has the full allotment, bidder 3 has 2 more shares to buy and there is 1 share left to allocate. It goes to bidder 3 and all shares have been allotted. Bidder 4 is the only bidder who gets no shares. Function Description Complete the function getUnallottedUsers in the editor below. The function must return a list of integers, each an Id for those bidders who receive no shares, sorted ascending getUnallottedUsers has the following parameter(s): bids[bids[0]bids{n-1}]: a 2D array of arrays of integers, ld, shares, price, timestamp named u, sc, bp, ts going forward totalShares: an integer, the total shares to allocate Constraints • 1 sn < 104 . 1 su, sc, bp, ts, totalShares < 108

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:30
Some of the first computer games were created in the early 1970s by college students experimenting after hours to see what the were capable of doing.
Answers: 3
question
Computers and Technology, 22.06.2019 12:30
Which of the choices sean are not true when considering virus behavior
Answers: 1
question
Computers and Technology, 22.06.2019 17:40
Write a modular program (no classes yet, just from what you learned last year), that allows two players to play a game of tic-tac-toe. use a two-dimensional char array with 3 rows and 3 columns as the game board. each element of the array should be initialized with an asterisk (*). the program should display the initial board configuration and then start a loop that does the following: allow player 1 to select a location on the board for an x by entering a row and column number. then redisplay the board with an x replacing the * in the chosen location. if there is no winner yet and the board is not yet full, allow player 2 to select a location on the board for an o by entering a row and column number. then redisplay the board with an o replacing the * in the chosen location. the loop should continue until a player has won or a tie has occurred, then display a message indicating who won, or reporting that a tie occurred. player 1 wins when there are three xs in a row, a column, or a diagonal on the game board. player 2 wins when there are three ox in a row, a column, or a diagonal on the game board. a tie occurs when all of the locations on the board are full, but there is no winner. input validation: only allow legal moves to be entered. the row must be 1, 2, or 3. the column must be 1, 2 3. the (row, column) position entered must currently be empty (i.e., still have an asterisk in it).
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
You know the right answer?
A company registers an IPO on a website sellshares. com. All the shares on this website are availabl...
Questions
question
Mathematics, 30.06.2020 17:01
question
Mathematics, 30.06.2020 17:01
Questions on the website: 13722367