Find Second largest element in an array

Problem Given an array of integers, our task is to write a program that efficiently finds the second largest element present in the array. Similar problem - Find smallest and second smallest elements in an array Examples Example 1: Input : arr[] = {12, 35, 1, 10, 34, 1} Output : 34 Example 2: Input : arr[] = {10, 5, 10} Output : 5 ...

Largest Number From Given Numbers

Problem Given a list of non-negative integers nums, arrange them such that they form the largest number and return it. Since the result may be very large, so you need to return a string instead of an integer. Example Example 1: Input: nums = [10,2] Output: "210" Example 2: Input: nums = [3,30,34,5,9] Output: "9534330" ...

This site uses cookies to improve your experience on our website. By using and continuing to navigate this website, you accept this. Privacy Policy