Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Find the smallest element in an array

Easy

Problem Statement

Find the smallest element in an array

Sample Input

[10, 20, 5, 30]

Sample Output

The smallest element is: 5

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
fun main() { val numbers = arrayOf(10, 20, 5, 30) // Add your code here to find the smallest element }
Log in or sign up to run or submit your code.Log inSign up
Input
[10, 20, 5, 30]
Expected Output
The smallest element is: 5