Skip to content

Commit 937000b

Browse files
committed
Form the Largest in C#
1 parent f9b597a commit 937000b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
3+
class Kata
4+
{
5+
public static int MaxNumber(int n)
6+
{
7+
char[] res = n.ToString().ToCharArray();
8+
9+
Array.Sort(res);
10+
Array.Reverse(res);
11+
12+
return int.Parse(new string(res));
13+
}
14+
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ JS Video Tutorial) :
452452
/ [[Python](<(7%20kyu)%20Form%20The%20Largest/(7%20kyu)%20Form%20The%20Largest.py>)]
453453
/ [[Rust](<(7%20kyu)%20Form%20The%20Largest/(7%20kyu)%20Form%20The%20Largest.rs>)]
454454
/ [[C++](<(7%20kyu)%20Form%20The%20Largest/(7%20kyu)%20Form%20The%20Largest.cpp>)]
455-
/ [C#]
455+
/ [[C#](<(7%20kyu)%20Form%20The%20Largest/(7%20kyu)%20Form%20The%20Largest.cs>)]
456456
/ [Java]
457457
/ [Go]
458458
<br>

0 commit comments

Comments
 (0)