Siemens Coding Question – Solved

6 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

| Given an n x m grid, where rows are numbered from 7 to n and columns from 1 to … |
| There are 'N' coders standing in a line, where i denotes the ith position of a … |
| A birthday party was attended by N number of kids, and each kid was given a uni… |
| Given a matrix of size m * n, where m denotes the number of rows (starting with… |
| A traveler is traveling from the city of Zeta to Omega. He starts with X amount… |
| As an operations engineer at Amazon, you are responsible for organizing the dis… |