About 1,940,000 results
Open links in new tab
  1. Find the smallest and second smallest elements in an array

    Mar 11, 2025 · Finding the smallest and second smallest elements by traversing the array twice (One-pass): Efficient Solution can find the minimum two elements in one traversal. Below is …

  2. Finding minimum in 2D array C - Stack Overflow

    Mar 31, 2014 · You can try code below to find maximum & minimum from a matrix of any order. int a[5][5],r,c; . printf("\n\t\t**Smallest & largest no. from matrix**\n"); . printf("\n\tEnter the size of …

  3. Kth smallest element in a row-wise and column-wise sorted 2D array

    Feb 11, 2025 · Given a number K where K lies in the range [1, n*n], find the Kth smallest element in the given 2D matrix. Example: Initialize a 1-dimensional array of size n*n to store all the …

  4. c - Find n-th smallest element in array without sorting ... - Stack ...

    Oct 20, 2012 · The simplest way to find the nth largest element in an array without using any sorting methods.

  5. C Program to Find Largest and Smallest in 2d Array with Their …

    Take an array of numbers as input, find the largest and smallest element among them, and display the result. To write this program, first, we need to take the largest and smallest …

  6. c program for smallest and second smallest in array

    Jun 20, 2020 · int smallest, secondsmallest; int array[100], size, i; printf("\n How many elements do you want to enter: "); scanf("%d", &size); printf("\nEnter %d elements: ", size); for (i = 0 ; i < …

  7. Program to find smallest array element in C - Online Tutorials …

    Learn how to find the smallest element in an array using C programming. Step-by-step examples and explanations to enhance your coding skills.

  8. How to Find the Smallest Element in a 2D Array in C - Tutorial Kart

    To find the smallest element in a 2D array in C, we need to traverse all elements of the array, compare them, and keep track of the smallest value found. This can be achieved using nested …

  9. C Program to Find Minimum Element in Array - W3Schools

    C program to find smallest element present in an array. It also prints the location or index at which minimum element occurs in array.

  10. C Program to Find Second Smallest Element in an Array

    Jul 7, 2016 · Element which is having the second smallest value in a given array is called as the Second Smallest Element in an Array. Example: Let us consider an array of values as given …

Refresh