File tree Expand file tree Collapse file tree 7 files changed +8
-7
lines changed
src/main/kotlin/g3201_3300
s3206_alternating_groups_i
s3207_maximum_points_after_enemy_battles
s3208_alternating_groups_ii
s3209_number_of_subarrays_with_and_value_of_k
s3210_find_the_encrypted_string
s3211_generate_binary_strings_without_adjacent_zeros
s3212_count_submatrices_with_equal_frequency_of_x_and_y Expand file tree Collapse file tree 7 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
1
package g3201_3300.s3206_alternating_groups_i
2
2
3
- // #Easy #Array #Sliding_Window #2024_07_09_Time_1_ms_(97.24%)_Space_42.8_MB_(90.31 %)
3
+ // #Easy #Array #Sliding_Window #2024_07_11_Time_167_ms_(88.14%)_Space_38.3_MB_(23.73 %)
4
4
5
5
class Solution {
6
6
fun numberOfAlternatingGroups (colors : IntArray ): Int {
Original file line number Diff line number Diff line change 1
1
package g3201_3300.s3207_maximum_points_after_enemy_battles
2
2
3
- // #Medium #Array #Greedy #2024_07_09_Time_1_ms_ (100.00%)_Space_55.5_MB_(99.34 %)
3
+ // #Medium #Array #Greedy #2024_07_11_Time_470_ms_ (100.00%)_Space_62_MB_(95.56 %)
4
4
5
5
import kotlin.math.min
6
6
Original file line number Diff line number Diff line change 1
1
package g3201_3300.s3208_alternating_groups_ii
2
2
3
- // #Medium #Array #Sliding_Window #2024_07_09_Time_2_ms_(99.02%)_Space_63.3_MB_(22.96 %)
3
+ // #Medium #Array #Sliding_Window #2024_07_11_Time_449_ms_(97.62%)_Space_59.6_MB_(100.00 %)
4
4
5
5
import kotlin.math.max
6
6
Original file line number Diff line number Diff line change 1
1
package g3201_3300.s3209_number_of_subarrays_with_and_value_of_k
2
2
3
3
// #Hard #Array #Binary_Search #Bit_Manipulation #Segment_Tree
4
- // #2024_07_09_Time_7_ms_ (100.00%)_Space_62.9_MB_(11.74 %)
4
+ // #2024_07_11_Time_530_ms_ (100.00%)_Space_58.2_MB_(76.19 %)
5
5
6
6
class Solution {
7
7
fun countSubarrays (nums : IntArray , k : Int ): Long {
Original file line number Diff line number Diff line change 1
1
package g3201_3300.s3210_find_the_encrypted_string
2
2
3
- // #Easy #String #2024_07_09_Time_1_ms_(100.00%)_Space_42.8_MB_(34.96 %)
3
+ // #Easy #String #2024_07_11_Time_170_ms_(62.69%)_Space_35.5_MB_(67.16 %)
4
4
5
5
@Suppress(" NAME_SHADOWING" )
6
6
class Solution {
Original file line number Diff line number Diff line change 1
1
package g3201_3300.s3211_generate_binary_strings_without_adjacent_zeros
2
2
3
- // #Medium #String #Bit_Manipulation #Recursion #2024_07_09_Time_1_ms_(100.00%)_Space_46_MB_(27.65%)
3
+ // #Medium #String #Bit_Manipulation #Recursion
4
+ // #2024_07_11_Time_237_ms_(38.18%)_Space_45.3_MB_(5.45%)
4
5
5
6
class Solution {
6
7
fun validStrings (n : Int ): List <String > {
Original file line number Diff line number Diff line change 1
1
package g3201_3300.s3212_count_submatrices_with_equal_frequency_of_x_and_y
2
2
3
- // #Medium #Array #Matrix #Prefix_Sum #2024_07_09_Time_15_ms_(100.00%)_Space_117_MB_(99.13 %)
3
+ // #Medium #Array #Matrix #Prefix_Sum #2024_07_11_Time_1009_ms_(78.95%)_Space_158.6_MB_(50.00 %)
4
4
5
5
class Solution {
6
6
fun numberOfSubmatrices (grid : Array <CharArray >): Int {
You can’t perform that action at this time.
0 commit comments