Skip to content

Instantly share code, notes, and snippets.

@lbvf50mobile
lbvf50mobile / deleteNode.go
Last active May 5, 2024 08:46
Leetcode: 237. Delete Node in a Linked List.
// Leetcode: 237. Delete Node in a Linked List.
// https://leetcode.com/problems/delete-node-in-a-linked-list/
// = = = = = = = = = = = = = =
// Accepted.
// Thanks God, Jesus Christ!
// = = = = = = = = = = = = = =
// Runtime: 3 ms, faster than 73.24% of Go online submissions for Delete Node
// in a Linked List.
// Memory Usage: 2.9 MB, less than 58.80% of Go online submissions for Delete
// Node in a Linked List.
@lbvf50mobile
lbvf50mobile / numRescueBoats.go
Created May 4, 2024 04:35
Leetcode: 881. Boats to Save People.
// Leetcode: 881. Boats to Save People.
// https://leetcode.com/problems/boats-to-save-people/
// = = = = = = = = = = = = = =
// Accepted.
// Thank God, Jesus Christ!
// = = = = = = = = = = = = = =
// Runtime: 54 ms, faster than 80.23% of Go online submissions for Boats to
// Save People.
// Memory Usage: 7.1 MB, less than 63.95% of Go online submissions for Boats
// to Save People.
@lbvf50mobile
lbvf50mobile / compareVersion.go
Created May 3, 2024 04:39
Leetcode: 165. Compare Version Numbers.
// Leetcode: 165. Compare Version Numbers.
// https://leetcode.com/problems/compare-version-numbers/
// = = = = = = = = = = = = = =
// Accepted.
// Thanks God, Jesus Christ!
// = = = = = = = = = = = = = =
// Runtime: 1 ms, faster than 78.95% of Go online submissions for Compare
// Version Numbers.
// Memory Usage: 2.2 MB, less than 21.05% of Go online submissions for Compare
// Version Numbers.
@lbvf50mobile
lbvf50mobile / findMaxK.go
Last active May 2, 2024 06:55
Leetcode: 2441. Largest Positive Integer That Exists With Its Negative.
// Leetcode: 2441. Largest Positive Integer That Exists With Its Negative.
// https://leetcode.com/problems/largest-positive-integer-that-exists-with-its-negative/
// = = = = = = = = = = = = = =
// Accepted.
// Thanks God, Jesus Christ!
// = = = = = = = = = = = = = =
// Runtime: 3 ms, faster than 100.00% of Go online submissions for Largest
// Positive Integer That Exists With Its Negative.
// Memory Usage: 5.1 MB, less than 88.46% of Go online submissions for Largest
// Positive Integer That Exists With Its Negative.
@lbvf50mobile
lbvf50mobile / reversePrefix.go
Created May 1, 2024 16:09
Leetcode: 2000. Reverse Prefix of Word.
// Leetcode: 2000. Reverse Prefix of Word.
// https://leetcode.com/problems/reverse-prefix-of-word/
// = = = = = = = = = = = = = =
// Accepted.
// Thanks God, Jesus Christ!
// = = = = = = = = = = = = = =
// Runtime: 1 ms, faster than 76.52% of Go online submissions for Reverse
// Prefix of Word.
// Memory Usage: 2.3 MB, less than 74.78% of Go online submissions for Reverse
// Prefix of Word.
@lbvf50mobile
lbvf50mobile / wonderfulSubstrings.go
Created April 30, 2024 16:44
Leetcode: 1915. Number of Wonderful Substrings.
// Leetcode: 1915. Number of Wonderful Substrings.
// https://leetcode.com/problems/number-of-wonderful-substrings/
// = = = = = = = = = = = = = =
// Accepted.
// Thanks God, Jesus Christ!
// = = = = = = = = = = = = = =
// Runtime: 256 ms, faster than 100.00% of Go online submissions for Number of
// Wonderful Substrings.
// Memory Usage: 6.7 MB, less than 100.00% of Go online submissions for Number
// of Wonderful Substrings.
@lbvf50mobile
lbvf50mobile / minOperations.go
Created April 29, 2024 16:41
Leetcode: 2997. Minimum Number of Operations to Make Array XOR Equal to K.
// Leetcode: 2997. Minimum Number of Operations to Make Array XOR Equal to K.
// https://leetcode.com/problems/minimum-number-of-operations-to-make-array-xor-equal-to-k/
// = = = = = = = = = = = = = =
// Accepted.
// Thanks God, Jesus Christ!
// = = = = = = = = = = = = = =
// Runtime: 87 ms, faster than 69.23% of Go online submissions for Minimum
// Number of Operations to Make Array XOR Equal to K.
// Memory Usage: 8 MB, less than 76.92% of Go online submissions for Minimum
// Number of Operations to Make Array XOR Equal to K.
@lbvf50mobile
lbvf50mobile / sumOfDistancesInTree.go
Last active April 29, 2024 16:30
Leetcode: 834. Sum of Distances in Tree.
// Leetcode: 834. Sum of Distances in Tree.
// https://leetcode.com/problems/sum-of-distances-in-tree/
// = = = = = = = = = = = = = =
// Accepted.
// Thanks God, Jesus Christ!
// = = = = = = = = = = = = = =
// Runtime: 286 ms, faster than 14.29% of Go online submissions for Sum of
// Distances in Tree.
// Memory Usage: 25 MB, less than 7.14% of Go online submissions for Sum of
// Distances in Tree.
@lbvf50mobile
lbvf50mobile / findRotateSteps.py
Last active April 27, 2024 16:12
Leetcode: 514. Freedom Trail.
# Leetcode: 514. Freedom Trail.
# https://leetcode.com/problems/freedom-trail/
# = = = = = = = = = = = = = =
# Accepted.
# Thanks God, Jesus Christ!
# = = = = = = = = = = = = = =
# Runtime: 254 ms, faster than 24.70% of Python3 online submissions for
# Freedom Trail.
# Memory Usage: 17.4 MB, less than 33.33% of Python3 online submissions for
# Freedom Trail.
@lbvf50mobile
lbvf50mobile / minFallingPathSum.py
Created April 26, 2024 16:10
Leetcode: 1289. Minimum Falling Path Sum II.
# Leetcode: 1289. Minimum Falling Path Sum II.
# https://leetcode.com/problems/minimum-falling-path-sum-ii/
# = = = = = = = = = = = = = =
# Accepted.
# Thanks God, Jesus Christ!
# = = = = = = = = = = = = = =
# Runtime: 213 ms, faster than 96.90% of Python3 online submissions for
# Minimum Falling Path Sum II.
# Memory Usage: 20.1 MB, less than 65.04% of Python3 online submissions for
# Minimum Falling Path Sum II.