Skip to content

Commit ebc7f88

Browse files
refactor 1365
1 parent 0ae4d97 commit ebc7f88

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

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

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,6 @@
44
import java.util.Arrays;
55
import java.util.List;
66

7-
/**
8-
* 1365. How Many Numbers Are Smaller Than the Current Number
9-
*
10-
* Given the array nums, for each nums[i] find out how many numbers in the array are smaller than it.
11-
* That is, for each nums[i] you have to count the number of valid j's such that j != i and nums[j] < nums[i].
12-
* Return the answer in an array.
13-
*
14-
* Example 1:
15-
* Input: nums = [8,1,2,2,3]
16-
* Output: [4,0,1,1,3]
17-
* Explanation:
18-
* For nums[0]=8 there exist four smaller numbers than it (1, 2, 2 and 3).
19-
* For nums[1]=1 does not exist any smaller number than it.
20-
* For nums[2]=2 there exist one smaller number than it (1).
21-
* For nums[3]=2 there exist one smaller number than it (1).
22-
* For nums[4]=3 there exist three smaller numbers than it (1, 2 and 2).
23-
*
24-
* Example 2:
25-
* Input: nums = [6,5,4,8]
26-
* Output: [2,1,0,3]
27-
*
28-
* Example 3:
29-
* Input: nums = [7,7,7,7]
30-
* Output: [0,0,0,0]
31-
*
32-
* Constraints:
33-
* 2 <= nums.length <= 500
34-
* 0 <= nums[i] <= 100
35-
* */
367
public class _1365 {
378
public static class Solution1 {
389
public int[] smallerNumbersThanCurrent(int[] nums) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy