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 346 solutions matching Medium, filtered from 1,055.
- 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
- 1095. Two City Scheduling Medium Languages: Python Accepted runtime 2ms
- 1096. Maximum Sum of Two Non-Overlapping Subarrays Medium Languages: Python Accepted runtime 0ms
- 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
- 1111. Minimum Score Triangulation of Polygon Medium Languages: Python Accepted runtime 35ms
- 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
- 1129. Longest String Chain Medium Languages: Python Accepted runtime 47ms
- 1130. Last Stone Weight II Medium Languages: Python Accepted runtime 7ms
- 1135. Customers Who Bought All Products Medium Languages: SQL Accepted runtime 489ms
- 1138. Grumpy Bookstore Owner Medium Languages: Python Accepted runtime 19ms
- 1139. Previous Permutation With One Swap Medium Languages: Python Accepted runtime 0ms
- 1147. Flip Columns For Maximum Number of Equal Rows Medium Languages: Python Accepted runtime 38ms
- 1148. Adding Two Negabinary Numbers Medium Languages: Python Accepted runtime 1ms
- 1155. Product Sales Analysis III Medium Languages: SQL Accepted runtime 628ms
- 1157. Insufficient Nodes in Root to Leaf Paths Medium Languages: Python Accepted runtime 8ms
- 1159. Smallest Subsequence of Distinct Characters Medium Languages: Python Accepted runtime 3ms
- 1160. Letter Tile Possibilities Medium Languages: Python Accepted runtime 37ms
- 1169. Largest Values From Labels Medium Languages: Python Accepted runtime 14ms
- 1171. Shortest Path in Binary Matrix Medium Languages: Python Accepted runtime 128ms
- 1182. Game Play Analysis IV Medium Languages: SQL Accepted runtime 528ms
- 1183. Statistics from a Large Sample Medium Languages: Python Accepted runtime 0ms
- 1184. Car Pooling Medium Languages: Python Accepted runtime 1ms
- 1186. Building H2O Medium Languages: Python Accepted runtime 60ms
- 1187. Print FooBar Alternately Medium Languages: Python Accepted runtime 65ms
- 1194. Path In Zigzag Labelled Binary Tree Medium Languages: Python Accepted runtime 0ms
- 1196. Filling Bookcase Shelves Medium Languages: Python Accepted runtime 0ms
- 1206. Corporate Flight Bookings Medium Languages: Python Accepted runtime 18ms
- 1207. Delete Nodes And Return Forest Medium Languages: Python Accepted runtime 43ms
- 1208. Maximum Nesting Depth of Two Valid Parentheses Strings Medium Languages: Python Accepted runtime 3ms
- 1212. Sequential Digits Medium Languages: C++ Accepted runtime 0ms
- 1216. Print Zero Even Odd Medium Languages: Python Accepted runtime 50ms
- 1218. Lowest Common Ancestor of Deepest Leaves Medium Languages: Python Accepted runtime 1ms
- 1219. Longest Well-Performing Interval Medium Languages: Python Accepted runtime 19ms
- 1222. Remove Covered Intervals Medium Languages: C++ Accepted runtime 0ms
- 1228. Minimum Cost Tree From Leaf Values Medium Languages: Python Accepted runtime 0ms
- 1229. Shortest Path with Alternating Colors Medium Languages: Python Accepted runtime 2ms
Page 2 of 7
These are practice solutions, not lessons. If you came here to learn how any of it works, the explanations live in the lessons.