Infinite loop occurs not able to fix it
int arr_size = n;// not a.length;
also you cant include 0 and have to print in elements in increasing order
int arr_size = n;// not a.length;
also you cant include 0 and have to print in elements in increasing order