×

# FAVMIN - Editorial

Author: Varun Singh

CAKEWALK

None

# PROBLEM:

Given the height of N minions, find the height of the tallest minion

# QUICK EXPLANATION:

Scan the height of all the minions and find the largest number among them.

# EXPLANATION:

For each test case, scan the height of all the minions one by one and keep a record of the largest number. The largest number is the answer.

# ALTERNATIVE SOLUTION:

Alternatively, one can store all the numbers in an array, sort them in descending order and print the first element of the array. Although this will take slightly longer than the previous solution but given the input size, it won't make any noticeable difference.

# AUTHOR'S SOLUTIONS:

Author's solution can be found here.

This question is marked "community wiki".

63
accept rate: 0%

 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×1,695
×801

question asked: 31 Mar '17, 18:40

question was seen: 514 times

last updated: 31 Mar '17, 19:16