> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/sidef-lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/sidef-lang/programming_tasks/l/largest_int_from_concatenated_ints.md).

# Largest int from concatenated ints

```ruby
func maxnum(nums) {
    nums.sort {|x,y|  "#{y}#{x}" <=> "#{x}#{y}" };
}
 
[[54, 546, 548, 60], [1, 34, 3, 98, 9, 76, 45, 4]].each { |c|
    say maxnum(c).join.to_num;
}
```

#### Output:

```
6054854654
998764543431
```
