PROBLEM LINKhttps://www.codechef.com/problems/EXPCODE1 Author:https://www.codechef.com/users/vivek96 DIFFICULTY:EASY PREREQUISITES:Array,Sorting PROBLEM:Being a programmer, Chef like arrays lot. On Chef' birthday,Chef friends given him an array "a" consists of n distinct integers. Unfortunately, the size of array "a" is too small. Chef want a bigger array!,Chef friends agree to give him an bigger array. but only if Chef is able to answer the following questions correctly: 1Largest element in array a 2Kth largest element Help him for getting bigger Array! EXPLANATION:First We need Largest Element in the Array,so we have to Sort the Array,you can use any sorting technique(bubble sort,quick sort,etc) because there is no issue of Constraints and then print the largest element in array a[ n1 ],Then answer for 2nd Question is print a[nk],because we know the kth largest element is at position nk Algorithm: begin BubbleSort(list) for all elements of list
return list Implementation: https://goo.gl/oKM4kb AUTHOR'S AND TESTER'S SOLUTIONS:http://campus.codechef.com/EXCO17TS/viewsolution/13037182/ Edit1Link+Corrections asked 15 Mar '17, 13:17

Hey dear, please try to fix the following 1 . Both the links, problem and author, lead to your profile. Also, you are not "author" of problem, but "editorialist". Its best to follow usual convention to avoid unnecessary hassle. (I know that by author you meant author of editorial , but still.) 2 . Its a beginner problem, and I am sure that beginners would appreciate if you can shed some more light on sorting techniques. Because its unfair that we expect beginners to already know advanced sorting techniques like quick sort, merge sort etc. What I want to convey is that, editorial should have something/some concept for people to learn, apart from the solution. If you can include details of one of the sorting techniques, the editorial would get a lot attractive to beginners. 3 . Stray link in line "arraya[n1],Then answer for 2nd Question " (last line of explanation). Fix it by adding a space between square brackets and n1. 4 . An analysis of time complexity is generally expected in editorials. See if you can do something about it :) answered 15 Mar '17, 13:57
