Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DongguemYoo/b7736bfb27e992059f49eb958f9a1333 to your computer and use it in GitHub Desktop.
Save DongguemYoo/b7736bfb27e992059f49eb958f9a1333 to your computer and use it in GitHub Desktop.
코딩테스트 연습 정수 내림차순으로 배치하기.cs
//검색 c# OrderByDescending사용법
//c# iorderedenumerable<char> to string
public long solution(long n)
{
long answer;
var t = n.ToString().OrderByDescending(x => x);
answer = long.Parse(new string(t.ToArray()));
return answer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment