What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-08-27 11:57:02
Given the participants' score sheet for your University Sports Day, you are required to find the runner-up score. You are given scores. Store them in a list and find the score of the runner-up.
price=[10,20,4,5,4,6,46,43,4,64,65,8,45,55,558,15,5,4,6,5,255,5] price.sort() price.reverse() max=price[0] sec_max=price[1] print(price) print(f"the max is {max}, runner up is {sec_max}") Add solution -
C# 2021-08-26 11:05:03
unity3d sort list
// listVariable = The list of objects/vars etc. // 'delegate' command - aka callback // a / b - the values to compare // N.B. possible return values are 1, 0 and -1. The .compare method // can be used on multiple var types to ease sorting, e.g. int, floa... Add solution
Best helpers
Ranking is empty