LeetCode solutions — page 6
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 251–300 of 1,055 solutions.
- 1528. Kids With the Greatest Number of Candies Easy Languages: Python Accepted runtime 0ms
- 1532. Reformat The String Easy Languages: Python Accepted runtime 8ms
- 1535. Build Array Where You Can Find The Maximum Exactly K Comparisons Hard Languages: Python Accepted runtime 1563ms
- 1537. Maximum Score After Splitting a String Easy Languages: Python Accepted runtime 4ms
- 1541. Top Travellers Easy Languages: SQL Accepted runtime 934ms
- 1542. Consecutive Characters Easy Languages: Python Accepted runtime 7ms
- 1547. Destination City Easy Languages: Python Accepted runtime 0ms
- 1548. Check If All 1's Are at Least Length K Places Away Easy Languages: Python Accepted runtime 11ms
- 1554. Minimum Time to Collect All Apples in a Tree Medium Languages: C++ Accepted runtime 43ms
- 1555. Number of Ways of Cutting a Pizza Hard Languages: C++ Accepted runtime 7ms
- 1556. Make Two Arrays Equal by Reversing Subarrays Easy Languages: Python Accepted runtime 4ms
- 1557. Check If a String Contains All Binary Codes of Size K Medium Languages: Python Accepted runtime 235ms
- 1560. Number of Students Doing Homework at a Given Time Easy Languages: Python Accepted runtime 0ms
- 1566. Check If a Word Occurs As a Prefix of Any Word in a Sentence Easy Languages: Python Accepted runtime 0ms
- 1570. Final Prices With a Special Discount in a Shop Easy Languages: Python Accepted runtime 0ms
- 1574. Maximum Product of Two Elements in an Array Easy Languages: Python Accepted runtime 0ms
- 1580. Shuffle the Array Easy Languages: Python Accepted runtime 31ms
- 1584. Average Salary Excluding the Minimum and Maximum Salary Easy Languages: Python Accepted runtime 0ms
- 1586. Longest Subarray of 1's After Deleting One Element Medium Languages: Python Accepted runtime 63ms
- 1603. Running Sum of 1d Array Easy Languages: Python Accepted runtime 0ms
- 1610. XOR Operation in an Array Easy Languages: Python Accepted runtime 0ms
- 1613. Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree Hard Languages: Python Accepted runtime 534ms
- 1619. Path Crossing Easy Languages: Python Accepted runtime 3ms
- 1625. Group Sold Products By The Date Easy Languages: SQL Accepted runtime 439ms
- 1626. Can Make Arithmetic Progression From Sequence Easy Languages: Python Accepted runtime 3ms
- 1630. Count Odd Numbers in an Interval Range Easy Languages: Python Accepted runtime 30ms
- 1631. Number of Sub-arrays With Odd Sum Medium Languages: Python Accepted runtime 74ms
- 1635. Number of Good Pairs Easy Languages: Python Accepted runtime 0ms
- 1636. Number of Substrings With Only 1s Medium Languages: Python Accepted runtime 26ms
- 1638. Best Position for a Service Centre Hard Languages: Python Accepted runtime 107ms
- 1642. Water Bottles Easy Languages: Python Accepted runtime 0ms
- 1644. Maximum Number of Non-Overlapping Substrings Hard Languages: Python Accepted runtime 263ms
- 1645. Find a Value of a Mysterious Function Closest to Target Hard Languages: Python Accepted runtime 514ms
- 1646. Kth Missing Positive Number Easy Languages: Python Accepted runtime 4ms
- 1651. Shuffle String Easy Languages: Python Accepted runtime 0ms
- 1656. Count Good Triplets Easy Languages: Python Accepted runtime 165ms
- 1660. Thousand Separator Easy Languages: Python Accepted runtime 0ms
- 1664. Find Users With Valid E-Mails Easy Languages: SQL Accepted runtime 710ms
- 1666. Make The String Great Easy Languages: Python Accepted runtime 0ms
- 1670. Patients With a Condition Easy Languages: SQL Accepted runtime 373ms
- 1677. Matrix Diagonal Sum Easy Languages: Python Accepted runtime 0ms
- 1679. Shortest Subarray to be Removed to Make Array Sorted Medium Languages: Python Accepted runtime 13ms
- 1682. Most Visited Sector in a Circular Track Easy Languages: Python Accepted runtime 0ms
- 1689. Detect Pattern of Length M Repeated K or More Times Easy Languages: Python Accepted runtime 0ms
- 1691. Minimum Number of Days to Disconnect Island Hard Languages: C++ Accepted runtime 84ms
- 1693. Sum of All Odd Length Subarrays Easy Languages: Python Accepted runtime 0ms
- 1694. Make Sum Divisible by P Medium Languages: Python Accepted runtime 67ms
- 1698. Replace All ?'s to Avoid Consecutive Repeating Characters Easy Languages: Python Accepted runtime 0ms
- 1704. Special Positions in a Binary Matrix Easy Languages: Python Accepted runtime 6ms
- 1708. Design Parking System Easy Languages: Python Accepted runtime 3ms
Page 6 of 22
These are practice solutions, not lessons. If you came here to learn how any of it works, the explanations live in the lessons.