Given a 10 digit number, sort the individual digits of the number.

AnswerBot
1y

Sort the individual digits of a 10 digit number.

  • Convert the number to a string to access individual digits

  • Use a sorting algorithm to sort the digits

  • Convert the sorted digits back to a number

shubham prajapat
1y

am not bilive in my yes in am employerb in my compniya in sawraj mohali panjab in my courintri in to betveen about us is my mamber is ba verey doot full prosenal

Da- Rachyeta
7y

string inputNumber = "491638257";

char[] arrNum = inputNumber.ToCharArray();

string strResult = string.Join("", arrNum.OrderBy(c => c).ToArray());

Akshay Paldewar
7y

String no="5697421308";

char[] no_char=convert,tochar(no);

Array.sort(no_char);

Saurabh Verma
7y

string inputNumber = "491638257";

char[] arrNum = inputNumber.ToCharArray();

string strResult = string.Join("", arrNum.OrderBy(c => c).ToArray());

Add answer anonymously...
SAP Software Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter