LeetCode solutions — page 2
Every LeetCode problem I have solved, with the accepted code in each language I solved it in. The problem statements stay on LeetCode where they belong — what is here is the solution, the runtime it was accepted at, and a link to the repository it came from.
1,055 solutions
Showing 51–100 of 867 solutions matching Python, filtered from 1,055.
- 1036. Rotting Oranges Medium Languages: Python Accepted runtime 3ms
- 1037. Minimum Number of K Consecutive Bit Flips Hard Languages: Python Accepted runtime 255ms
- 1038. Number of Squareful Arrays Hard Languages: Python Accepted runtime 4ms
- 1040. Maximum Binary Tree II Medium Languages: Python Accepted runtime 0ms
- 1042. Minimum Cost to Merge Stones Hard Languages: Python Accepted runtime 1ms
- 1043. Grid Illumination Hard Languages: Python Accepted runtime 187ms
- 1045. Check If Word Is Valid After Substitutions Medium Languages: Python Accepted runtime 32ms
- 1046. Max Consecutive Ones III Medium Languages: Python Accepted runtime 83ms
- 1048. Clumsy Factorial Medium Languages: Python Accepted runtime 19ms
- 1049. Minimum Domino Rotations For Equal Row Medium Languages: Python Accepted runtime 26ms
- 1050. Construct Binary Search Tree from Preorder Traversal Medium Languages: Python Accepted runtime 1ms
- 1055. Pairs of Songs With Total Durations Divisible by 60 Medium Languages: Python Accepted runtime 13ms
- 1056. Capacity To Ship Packages Within D Days Medium Languages: Python Accepted runtime 189ms
- 1057. Numbers With Repeated Digits Hard Languages: Python Accepted runtime 0ms
- 1058. Lexicographically Smallest Equivalent String Medium Languages: Python Accepted runtime 6ms
- 1063. Best Sightseeing Pair Medium Languages: Python Accepted runtime 68ms
- 1064. Smallest Integer Divisible by K Medium Languages: Python Accepted runtime 11ms
- 1065. Binary String With Substrings Representing 1 To N Medium Languages: Python Accepted runtime 0ms
- 1070. Convert to Base -2 Medium Languages: Python Accepted runtime 2ms
- 1072. Next Greater Node In Linked List Medium Languages: Python Accepted runtime 17ms
- 1073. Number of Enclaves Medium Languages: Python Accepted runtime 39ms
- 1080. Camelcase Matching Medium Languages: Python Accepted runtime 0ms
- 1081. Video Stitching Medium Languages: Python Accepted runtime 0ms
- 1087. Longest Arithmetic Subsequence Medium Languages: Python Accepted runtime 1892ms
- 1092. Maximum Difference Between Node and Ancestor Medium Languages: Python Accepted runtime 0ms
- 1093. Recover a Tree From Preorder Traversal Hard Languages: Python Accepted runtime 21ms
- 1095. Two City Scheduling Medium Languages: Python Accepted runtime 2ms
- 1096. Maximum Sum of Two Non-Overlapping Subarrays Medium Languages: Python Accepted runtime 0ms
- 1097. Stream of Characters Hard Languages: Python Accepted runtime 284ms
- 1103. Moving Stones Until Consecutive Medium Languages: Python Accepted runtime 0ms
- 1104. Coloring A Border Medium Languages: Python Accepted runtime 2ms
- 1105. Uncrossed Lines Medium Languages: Python Accepted runtime 81ms
- 1106. Escape a Large Maze Hard Languages: Python Accepted runtime 203ms
- 1111. Minimum Score Triangulation of Polygon Medium Languages: Python Accepted runtime 35ms
- 1112. Find Words That Can Be Formed by Characters Easy Languages: Python Accepted runtime 71ms
- 1113. Moving Stones Until Consecutive II Medium Languages: Python Accepted runtime 14ms
- 1114. Binary Search Tree to Greater Sum Tree Medium Languages: Python Accepted runtime 0ms
- 1116. Maximum Level Sum of a Binary Tree Medium Languages: Python Accepted runtime 22ms
- 1117. As Far from Land as Possible Medium Languages: Python Accepted runtime 128ms
- 1119. Robot Bounded In Circle Medium Languages: Python Accepted runtime 0ms
- 1120. Flower Planting With No Adjacent Medium Languages: Python Accepted runtime 34ms
- 1121. Partition Array for Maximum Sum Medium Languages: Python Accepted runtime 249ms
- 1122. Longest Duplicate Substring Hard Languages: Python Accepted runtime 980ms
- 1129. Longest String Chain Medium Languages: Python Accepted runtime 47ms
- 1130. Last Stone Weight II Medium Languages: Python Accepted runtime 7ms
- 1133. Last Substring in Lexicographical Order Hard Languages: Python Accepted runtime 156ms
- 1138. Grumpy Bookstore Owner Medium Languages: Python Accepted runtime 19ms
- 1139. Previous Permutation With One Swap Medium Languages: Python Accepted runtime 0ms
- 1145. Number of Submatrices That Sum to Target Hard Languages: Python Accepted runtime 369ms
- 1147. Flip Columns For Maximum Number of Equal Rows Medium Languages: Python Accepted runtime 38ms
Page 2 of 18
These are practice solutions, not lessons. If you came here to learn how any of it works, the explanations live in the lessons.