79606275

Date: 2025-05-05 03:17:27
Score: 1.5
Natty:
Report link
for(int i=0;i<nums.size();i++){
if(nums[0]==max_ele){
            swap(nums[0],nums[nums.size()-1]);
        }
        else {
            swap(nums[nums.size()-1],nums[nums.size()-2]);
        }
}    
   for(int n:nums){
       cout<<n<<" ";
   }  

I ran this code got 200 out of 266 testcase Please someone correct it.If it is wrong I will quit coding.      
Reasons:
  • RegEx Blacklisted phrase (1): I ran this code got 200 out of 266 testcase Please
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Abhishek Iyer