Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 94ba1eb

Browse files
refactor 1313
1 parent d36fe68 commit 94ba1eb

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/main/java/com/fishercoder/solutions/_1313.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,6 @@
33
import java.util.ArrayList;
44
import java.util.List;
55

6-
/**
7-
* 1313. Decompress Run-Length Encoded List
8-
*
9-
* We are given a list nums of integers representing a list compressed with run-length encoding.
10-
* Consider each adjacent pair of elements [a, b] = [nums[2*i], nums[2*i+1]] (with i >= 0).
11-
* For each such pair, there are a elements with value b in the decompressed list.
12-
*
13-
* Return the decompressed list.
14-
*
15-
* Example 1:
16-
* Input: nums = [1,2,3,4]
17-
* Output: [2,4,4,4]
18-
* Explanation: The first pair [1,2] means we have freq = 1 and val = 2 so we generate the array [2].
19-
* The second pair [3,4] means we have freq = 3 and val = 4 so we generate [4,4,4].
20-
* At the end the concatenation [2] + [4,4,4,4] is [2,4,4,4].
21-
*
22-
* Constraints:
23-
* 2 <= nums.length <= 100
24-
* nums.length % 2 == 0
25-
* 1 <= nums[i] <= 100
26-
* */
276
public class _1313 {
287
public static class Solution1 {
298
public int[] decompressRLElist(int[] nums) {

0 commit comments

Comments
 (0)