Skip to content

Commit

Permalink
Improved tasks 2827, 2835, 2846, 2855
Browse files Browse the repository at this point in the history
  • Loading branch information
javadev authored Dec 18, 2023
1 parent 3f78b4e commit 03ffa18
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package g2801_2900.s2827_number_of_beautiful_integers_in_the_range

import kotlin.math.max

@Suppress("kotlin:S107")
class Solution {
private lateinit var dp: Array<Array<Array<Array<IntArray>>>>
private var maxLength = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Solution {
if (sum < target) {
return -1
}
while (!pq.isEmpty()) {
while (pq.isNotEmpty()) {
val `val` = pq.poll()
sum -= `val`.toLong()
if (`val` <= target) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package g2801_2900.s2846_minimum_edge_weight_equilibrium_queries_in_a_tree
import kotlin.math.ln
import kotlin.math.max

@Suppress("kotlin:S107")
class Solution {
private class Node(var v: Int, var w: Int)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package g2801_2900.s2855_minimum_right_shifts_to_sort_the_array

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

@Suppress("kotlin:S6510")
class Solution {
fun minimumRightShifts(nums: List<Int>): Int {
var i = 1
Expand Down

0 comments on commit 03ffa18

Please sign in to comment.