Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

for this question: a greedy search that must check all meaningful line combinations that could build a regular triangle. Finally, the code must return the

for this question:image text in transcribed a greedy search that must check all meaningful line combinations that could build a regular triangle. Finally, the code must return the lines of the triangle that has longest perimeter.

any programing language would do

but please write a report that includes:

an Online link to see and to run the codes on an online compiler site which has no access problems.

Explanations about the methods/approaches used and the code logic.

Calculations of the worst, best and average case time complexities and final representations using big-O, big- and big- notations.

QUESTION 2- Given an array of line lengths, please write a function that chooses 3 of the lines to construct a regular triangle with the maximum possible perimeter. Return an array of the lengths of triangle sides as integers. Signature of the function could be: public List maxPerimeterTriangle(List lines) \{ \} Sample: For instance, if the list of lines would be [1,2,3,4,5,10] the function must return the line list [3,4,5] since this combination gives the maximum perimeter length

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students explore these related Databases questions

Question

How intense is the grief for them?

Answered: 3 weeks ago

Question

Does it exceed two pages in length?

Answered: 3 weeks ago

Question

Does it avoid typos and grammatical errors?

Answered: 3 weeks ago