Minimum element left from the array after performing given operations | C # implementation of the above approach ; Function to return the minimum possible value of the last element left after performing the given operations ; Driver code
using System ; using System . Linq ; class GFG { static int getMin ( int [ ] arr , int n ) { int minVal = arr . Min ( ) ; return minVal ; } public static void Main ( String [ ] args ) { int [ ] arr = { 5 , 3 , 1 , 6 , 9 } ; int n = arr . Length ; Console . WriteLine ( getMin ( arr , n ) ) ; } }