Skip to content

Commit 9abb6c9

Browse files
committed
try to solve no.3663
1 parent c33b0f4 commit 9abb6c9

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

javascript/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,14 +1395,19 @@ Explanation: The robot moves left twice. It ends up two "moves" to the left of t
13951395
/**
13961396
* 3663. Find The Least Frequent Digit
13971397
*
1398+
* 參數為一整數n,找出在其十進位表示中出現頻率最低的數字。如果多個數字的出現頻率相同,則選擇最小的那個數字。
1399+
* 以整數形式傳回所選的數字。
1400+
* 數字x的出現頻率是指它在n的十進位表示法中的出現次數
1401+
*
13981402
* @param {number} n
13991403
* @return {number}
14001404
*/
14011405
var getLeastFrequentDigit = function(n) {
14021406
/**
1403-
* 找出n中出現次數最少的數字有幾次,若有好幾個,則回傳最小數字
1407+
* 找出n中以十進位出現次數最少的數字,若有好幾個數字出現次數一樣,則回傳最小的整數
14041408
*
1405-
* hash table
1409+
* solution 1. Hash table
1410+
* solution 2. Array
14061411
*/
14071412
let nSplitToStr = n.toString().split("");
14081413
let map = new Map();

0 commit comments

Comments
 (0)