Skip to content

Commit 03ffa18

Browse files
authored
Improved tasks 2827, 2835, 2846, 2855
1 parent 3f78b4e commit 03ffa18

File tree

4 files changed

+4
-1
lines changed
  • src/main/kotlin/g2801_2900
    • s2827_number_of_beautiful_integers_in_the_range
    • s2835_minimum_operations_to_form_subsequence_with_target_sum
    • s2846_minimum_edge_weight_equilibrium_queries_in_a_tree
    • s2855_minimum_right_shifts_to_sort_the_array

4 files changed

+4
-1
lines changed

src/main/kotlin/g2801_2900/s2827_number_of_beautiful_integers_in_the_range/Solution.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package g2801_2900.s2827_number_of_beautiful_integers_in_the_range
44

55
import kotlin.math.max
66

7+
@Suppress("kotlin:S107")
78
class Solution {
89
private lateinit var dp: Array<Array<Array<Array<IntArray>>>>
910
private var maxLength = 0

src/main/kotlin/g2801_2900/s2835_minimum_operations_to_form_subsequence_with_target_sum/Solution.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Solution {
1818
if (sum < target) {
1919
return -1
2020
}
21-
while (!pq.isEmpty()) {
21+
while (pq.isNotEmpty()) {
2222
val `val` = pq.poll()
2323
sum -= `val`.toLong()
2424
if (`val` <= target) {

src/main/kotlin/g2801_2900/s2846_minimum_edge_weight_equilibrium_queries_in_a_tree/Solution.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package g2801_2900.s2846_minimum_edge_weight_equilibrium_queries_in_a_tree
66
import kotlin.math.ln
77
import kotlin.math.max
88

9+
@Suppress("kotlin:S107")
910
class Solution {
1011
private class Node(var v: Int, var w: Int)
1112

src/main/kotlin/g2801_2900/s2855_minimum_right_shifts_to_sort_the_array/Solution.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package g2801_2900.s2855_minimum_right_shifts_to_sort_the_array
22

33
// #Easy #Array #2023_12_18_Time_169_ms_(75.00%)_Space_36.7_MB_(50.00%)
44

5+
@Suppress("kotlin:S6510")
56
class Solution {
67
fun minimumRightShifts(nums: List<Int>): Int {
78
var i = 1

0 commit comments

Comments
 (0)