Skip to content

Commit ed4e7c1

Browse files
author
jinvicky
committed
fix lint
1 parent 498eef8 commit ed4e7c1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

โ€Žtop-k-frequent-elements/jinvicky.javaโ€Ž

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// [ํ’€์ด]
66
// 1. <์ˆซ์ž: ๋นˆ๋„์ˆ˜>๋ฅผ ์ €์žฅํ•˜๋Š” HashMap๊ณผ [๋นˆ๋„์ˆ˜, ์ˆซ์ž]๋ฅผ ์ €์žฅํ•˜๋Š” PriorityQueue๋ฅผ ์„ ์–ธํ•œ๋‹ค.
77
// 2. HashMap์— ์ˆซ์ž๋ณ„๋กœ ๋นˆ๋„์ˆ˜๋ฅผ ํ•จ๊ป˜ ์ €์žฅํ•ด์„œ ํ•ด์‹œํ…Œ์ด๋ธ”์„ ๋งŒ๋“ ๋‹ค.
8-
// 3.
98
// [์šฐ์„ ์ˆœ์œ„ ํ์— ์‚ฌ์šฉ๋œ ์ž๋ฃŒ๊ตฌ์กฐ]
109
// 1. ๋ณ„๋„ ํด๋ž˜์Šค๋ฅผ ์„ ์–ธ
1110
// 2. ์š”๊ตฌ์‚ฌํ•ญ ์ž๋ฃŒํ˜• ๋ฐฐ์—ด์„ ์„ ์–ธํ•œ๋‹ค.
@@ -15,7 +14,7 @@
1514
// 1. ์šฐ์„ ์ˆœ์œ„ ํ๋Š” ๋งค๋ฒˆ ์š”์†Œ๊ฐ€ ์ถ”๊ฐ€๋  ๋•Œ๋งˆ๋‹ค ๋‚ด๋ถ€ ์ •๋ ฌ์„ ์ˆ˜ํ–‰ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์—ฐ์‚ฐ์„ ์ˆ˜ํ–‰ํ•˜๋ฉด์„œ k๊ฐœ๋ฅผ ์œ ์ง€ํ•ด์•ผ ํ•œ๋‹ค.
1615
// ๋˜ํ•œ ๊ธฐ์กด [๋นˆ๋„์ˆ˜, ์ˆซ์ž]๋ฅผ ๋ฒ„๋ ค์•ผ๋งŒ ์˜ฌ๋ฐ”๋ฅธ ๋‹ต์„ ๋„์ถœํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค.
1716
// 2. [์ˆซ์ž, ๋นˆ๋„์ˆ˜]๋กœ ์ €์žฅํ•˜๋Š” ๊ฒƒ๋งŒ ์ƒ๊ฐํ–ˆ๋”๋‹ˆ ๋‚ด๋ถ€ ์ •๋ ฌ์„ ์–ด๋–ป๊ฒŒ ํ•˜์ง€ ๋ชปํ•ด์„œ ๊ต‰์žฅํžˆ ๊ณ ๋ฏผํ–ˆ๋‹ค. ์ •๋‹ต์€ ๋ฐ˜๋Œ€์˜€๋‹ค.
18-
//
17+
1918
class Solution {
2019
public int[] topKFrequent(int[] nums, int k) {
2120
int[] answer = new int[k];

0 commit comments

Comments
ย (0)