We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 432377f commit 004604bCopy full SHA for 004604b
CATEGORY.md
@@ -50,3 +50,7 @@
50
https://ojeveryday.com/
51
52
https://labuladong.gitbook.io/algo/di-ling-zhang-bi-du-xi-lie/gitbook
53
+
54
+https://github.com/garciparedes
55
56
+https://garciparedes.me/#headers
src/179-largest-number/index.js
@@ -0,0 +1,12 @@
1
+/**
2
+ * @param {number[]} nums
3
+ * @return {string}
4
+ */
5
+var largestNumber = function (nums) {
6
+ return (
7
+ nums
8
+ .sort((x, y) => '' + y + x - ('' + x + y))
9
+ .join('')
10
+ .replace(/^0*/, '') || '0'
11
+ );
12
+};
0 commit comments