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

| You are given a board of size M Γ— N where each cell can be either empty ('O') o… |
| Undirected Coloured Graph Shortest Path You are given an undirected weight… |
| Village Voyage A computer game "Village Voyage" has N villages (labeled 1 to… |
| Academic Decathlon Students are being selected for an academic decathlon tea… |
| Sum of Arrays Given two arrays each of length n, arr1 and arr2, in one opera… |
| Count Swaps During Custom Sorting Analyze the efficiency of the following so… |