Skip to content

Commit 4f04e71

Browse files
edit 313
1 parent 9b20520 commit 4f04e71

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Your ideas/fixes/algorithms are more than welcome!
269269
|316|[Remove Duplicate Letters](https://leetcode.com/problems/remove-duplicate-letters/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_316.java)| O(n)|O(1)| Hard| Stack, Recursion, Greedy
270270
|315|[Count of Smaller Numbers After Self](https://leetcode.com/problems/count-of-smaller-numbers-after-self/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_315.java)| O(?)|O(?)| Hard| Tree
271271
|314|[Binary Tree Vertical Order Traversal](https://leetcode.com/problems/binary-tree-vertical-order-traversal/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_314.java)| O(n)|O(n) | Medium| HashMap, BFS
272-
|313|[Super Ugly Number](https://leetcode.com/problems/super-ugly-number/)|[Solution](../master/src/main/java/com/fishercoder/solutions/SuperUglyNumber.java)| O(?)|O(?)| Medium|
272+
|313|[Super Ugly Number](https://leetcode.com/problems/super-ugly-number/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_313.java)| O(?)|O(?)| Medium|
273273
|312|[Burst Balloons](https://leetcode.com/problems/burst-balloons/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_312.java)| O(?)|O(?)| Hard| DP
274274
|311|[Sparse Matrix Multiplication](https://leetcode.com/problems/sparse-matrix-multiplication/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_311.java)| O(m*n*l)|O(m*l)| Medium|
275275
|310|[Minimum Height Trees](https://leetcode.com/problems/minimum-height-trees/)|[Solution](../master/src/main/java/com/fishercoder/solutions/MinimumHeightTrees.java)| ? | ? | Medium|

src/main/java/com/fishercoder/solutions/SuperUglyNumber.java renamed to src/main/java/com/fishercoder/solutions/_313.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
package com.fishercoder.solutions;
22

33
/**
4+
* 313. Super Ugly Number
5+
*
46
* Write a program to find the nth super ugly number.
5-
* <p>
6-
* Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes of size k. For example, [1, 2, 4, 7, 8, 13, 14, 16, 19, 26, 28, 32] is the sequence of the first 12 super ugly numbers given primes = [2, 7, 13, 19] of size 4.
7-
* <p>
7+
* Super ugly numbers are positive numbers whose all prime factors
8+
* are in the given prime list primes of size k.
9+
* For example, [1, 2, 4, 7, 8, 13, 14, 16, 19, 26, 28, 32]
10+
* is the sequence of the first 12 super ugly numbers given primes = [2, 7, 13, 19] of size 4.
811
* Note:
912
* (1) 1 is a super ugly number for any given primes.
1013
* (2) The given numbers in primes are in ascending order.
1114
* (3) 0 < k ≤ 100, 0 < n ≤ 106, 0 < primes[i] < 1000.
1215
* (4) The nth super ugly number is guaranteed to fit in a 32-bit signed integer.
1316
*/
14-
public class SuperUglyNumber {
17+
public class _313 {
1518

1619
public int nthSuperUglyNumber(int n, int[] primes) {
1720
int[] ret = new int[n];

0 commit comments

Comments
 (0)