Sort an array when two halves are sorted | C # program to Merge two sorted halves of array Into Single Sorted Array ; Sort the given array using sort STL ; Driver code ; Print sorted Array
using System ; class GFG { static void mergeTwoHalf ( int [ ] A , int n ) { Array . Sort ( A ) ; } static public void Main ( ) { int [ ] A = { 2 , 3 , 8 , - 1 , 7 , 10 } ; int n = A . Length ; mergeTwoHalf ( A , n ) ; for ( int i = 0 ; i < n ; i ++ ) Console . Write ( A [ i ] + " ▁ " ) ; } }