Siemens Coding Question – Solved

4 Live
1. Question 1 You've just started as a trainer in Thoughtworks University, and you want to make a good first impression. You start investigating how to make it easier to organise the coding sessions. It turns out that trainers are spending a lot of their time finding out the average confidence of the participants. The coding sessions are organised based on how confident the participants are with programming. This is a self-score rating on a scale of 0 to 9. To save having to count how many participants there are, the trainers always prepend this number to the list of participant confidence ratings. You also find that coding sessions are done in pairs. When there are an odd number of participants, the overall confidence can be determined using the following flow chart:

Asked in: Siemens

Image of the Question

Question Image

All Testcases Passed βœ”



Passcode Image

Solution


Please login to view the solution


Related Questions

| The supply chain manager at one of Amazon's warehouses is shipping the last con… |
| Determine the highest value after executing n steps on an infinite 2D grid that… |
| Amazon Prime Video is developing a new feature called "Segmentify." This featur… |
| In this new stock prediction game launched on Amazon Games, Player 1 provides P… |
| Amazon operates numerous warehouses, with each warehouse holding inventory[i] u… |
| In Amazon's highly efficient logistics network, minimizing operational overhead… |