Knowee
Questions
Features
Study Tools

long long largestPerimeter(vector<int>& nums) { int n=nums.size(); if (n<3) return -1; sort(nums.begin(),nums.end()); int sum=nums[0]+nums[1]+nums[2]; int perimeter=0,i=3,newsum;… } return perimeter; }

Question

long long largestPerimeter(vector<int>& nums) { int n=nums.size(); if (n<3) return -1; sort(nums.begin(),nums.end()); int sum=nums[0]+nums[1]+nums[2]; int perimeter=0,i=3,newsum;… } return perimeter; }

🧐 Not the exact question you are looking for?Go ask a question

Solution

It seems like you've pasted a piece of code but didn't provide a question. Could you please specify what you need help with? Are you looking for an explanation of the code, or do you need help debugging it?

Similar Questions

long long largestPerimeter(vector<int>& nums) { int n=nums.size(); if (n<3) return -1; sort(nums.begin(),nums.end()); int sum=nums[0]+nums[1]+nums[2]; int perimeter=0,i=3,newsum;… } return perimeter; }

Which of the following data types can store the largest value?intshortlongbyt

write down the upper bound of a lengthmeasured correct to the nearest metre.

how Sometimes, a component of a vector can be larger than the magnitude of the vector.

A vector has a magnitude of 2m, but is pointing in an unknown direction. What is the maximum possible magnitude of its horizontal component?

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.