LeetCode problem solutions using programming language that I am learning. Now there are Rust, Go and C++.
- ListNode
new_from(Vec<i32>)
-> Option<Box>: create a linked list from aVec<i32>
object.to_vec(Option<Box<ListNode>>) -> Vec<i32>
: serialize a linked list to aVec<i32>
object
The following table is the link for problem solutions with realted Rust topics or keywords.
Problem | Solution | Related Rust keywords |
---|---|---|
6. ZigZag Conversion | p6 | String |
9. Palindrome Number | p9 | i32 ,if ,while |
13. Roman to Integer | p13 | Pattern ,for ,Option ,String ,Reference |
19. Remove Nth Node From End of List | p19 | Option ,Reference |
22. Generate Parentheses | p22 | Vec ,String |
29. Divide Two Integers | p29 | i32 |
30. Substring with Concatenation of All Words | p30 | HashMap |
33. Search in Rotated Sorted Array | p33 | |
38. Count and Say | p38 | String, char |
42. Trapping Rain Water | p42 | Vec ,BinaryHeap ,Reverse ,max |
62. Unique Paths | p62 | Vec |
63. Unique Paths II | p63 | Vec |
64. Minimum Path Sum | p63 | Vec |
66. Plus One | p66 | Vec ,while |
67. Add Binary | p67 | String ,Rev ,Iterator ,Option |
71. Simplify Path | p71 | Vec ,String |
72. Edit Distance | p72 | Vec ,String ,min |
74. Search a 2D Matrix | p74 | Vec |
75. Sort Colors | p75 | Vec |
81. Search in Rotated Sorted Array II | p81 | |
82. Remove Duplicates from Sorted List II | p82 | Vec |
83. Remove Duplicates from Sorted List | p83 | mut , Reference ,Option |
88. Merge Sorted Array | p88 | Vec |
89. Gray Code | p89 | Vec |
93. Restore IP Addresses | p93 | Vec ,parse |
97. Interleaving String | p97 | Vec ,String |
118. Pascal's Triangle | p118 | Vec |
119. Pascal's Triangle II | p119 | Vec |
125. Valid Palindrome | p125 | String ,Rev ,Iterator ,Option |
136. Single Number | p136 | Vec ,^ |
137. Single Number II | p137 | Vec ,>> ,<< |
166. Fraction to Recurring Decimal | p166 | String ,Vec ,char |
167. Two Sum II - Input Array Is Sorted | p167 | |
169. Majority Element | p169 | Vec ,Iterator |
172. Factorial Trailing Zeroes | p172 | |
187. Repeated DNA Sequences | p187 | String ,Vec ,HashMap |
190. Reverse Bits | p190 | >> , << |
191. Number of 1 Bits | p191 | u32 ,i32 |
200. Number of Islands | p200 | Vec |
201. Bitwise AND of Numbers Range | p201 | >> ,<< ,! |
206. Reverse Linked List | p206 | Option ,Box |
211. Design Add and Search Words Data Structure | p211 | Default ,HashMap |
219. Contains Duplicate II | p219 | Vec` |
228. Summary Ranges | p228 | Vec ,String |
229. Majority Element II | p229 | Vec ,Iterator |
230. Kth Smallest Element in a BST | p230 | Rc ,RefCell ,Vec |
231. Power of Two | p231 | & |
232. Implement Queue using Stacks | p232 | Vec |
238. Product of Array Except Self | p238 | Vec |
240. Search a 2D Matrix II | p240 | Vec |
241. Different Ways to Add Parentheses | p241 | |
242. Valid Anagram | p242 | String |
258. Add Digits | p258 | |
260. Single Number III | p260 | Vec , ^ , >> ,<< |
268. Missing Number | p268 | Vec |
273. Integer to English Words | p273 | String |
278. First Bad Version | p278 | |
282. Expression Add Operators | p282 | Vec ,String |
299. Bulls and Cows | p299 | HashMap ,BTreeSet ,format! |
300. Longest Increasing Subsequence | p300 | Vec ,max |
301. Remove Invalid Parentheses | p301 | Tuple ,String ,HashSet |
306. Additive Number | p306 | String ,char ,Slice |
307. Range Sum Query - Mutable | p307 | |
310. Minimum Height Trees | p310 | HashMap |
318. Maximum Product of Word Lengths | p318 | Vec ,String |
319. Bulb Switcher | p319 | sqrt |
322. Coin Change | p322 | Vec |
324. Wiggle Sort II | p324 | |
334. Increasing Triplet Subsequence | p334 | Vec |
335. Self Crossing | p335 | Vec |
352. Data Stream as Disjoint Intervals | p352 | struct ,Vec ,method ,impl |
357. Count Numbers with Unique Digits | p357 | |
367. Valid Perfect Square | p367 | Vec |
372. Super Pow | p372 | Vec |
373. Find K Pairs with Smallest Sums | p373 | Vec ,BinaryHeap |
374. Guess Number Higher or Lower | p374 | i32 |
375. Guess Number Higher or Lower II | p375 | Vec ,min ,max |
382. Linked List Random Node | p382 | Box ,rand |
383. Ransom Note | p383 | Vec |
384. Shuffle an Array | p384 | Vec ,clone ,rand |
385. Mini Parser | p385 | |
386. Lexicographical Numbers | p386 | |
390. Elimination Game | p390 | match |
393. UTF-8 Validation | p393 | Vec |
397. Integer Replacement | p397 | min |
398. Random Pick Index | p398 | HashMap |
391. Perfect Rectangle | p391 | HashMap ,unwrap_or ,struct |
400. Nth Digit | p400 | pow |
405. Convert a Number to Hexadecimal | p405 | String ,Range ,char |
407. Trapping Rain Water II | p407 | Vec ,BinaryHeap ,std::cmp::Reverse ,std::cmp::max |
412. Fizz Buzz | p412 | String , formate! |
414. Third Maximum Number | p414 | Vec , if-let |
417. Pacific Atlantic Water Flow | p417 | |
419. Battleships in a Board | p419 | Vec |
423. Reconstruct Original Digits from English | p423 | HashMap ,Array |
433. Minimum Genetic Mutation | p433 | |
434. Number of Segments in a String | p434 | String |
436. Find Right Interval | p434 | sort_by |
438. Find All Anagrams in a String | p438 | HashMap ,Vec |
440. K-th Smallest in Lexicographical Order | p440 | |
441. Arranging Coins | p441 | as |
442. Find All Duplicates in an Array | p442 | |
453. Minimum Moves to Equal Array Elements | p453 | Vec |
458. Poor Pigs | p458 | log2 ,ceil |
461. Hamming Distance | p461 | count_ones1, ^` |
462. Minimum Moves to Equal Array Elements II | p462 | |
464. Can I Win | p464 | HashMap |
467. Unique Substrings in Wraparound String | p467 | |
468. Validate IP Address | p468 | match |
473. Matchsticks to Square | p473 | << ,! |
475. Heaters | p475 | Vec |
476. Number Complement | p476 | >> ,<< |
478. Generate Random Point in a Circle | p478 | |
479. Largest Palindrome Product | p479 | pow |
481. Magical String | p481 | |
482. License Key Formatting | p482 | String ,slice |
488. Zuma Game | p488 | HashSet |
492. Construct the Rectangle | p492 | sqrt ,Vec |
495. Teemo Attacking | p495 | Vec |
496. Next Greater Element I | p496 | HashMap ,Vec |
497. Random Point in Non-overlapping Rectangles | p497 | |
498. Diagonal Traverse | p498 | |
500. Keyboard Row | p500 | Vec ,String ,const |
504. Base 7 | p504 | Vec.reverse |
506. Relative Ranks | p506 | Vec ,binary_search_by ,sort_by ,HashMap |
507. Perfect Number | p507 | sqrt |
508. Most Frequent Subtree Sum | p508 | |
513. Find Bottom Left Tree Value | p513 | |
515. Find Largest Value in Each Tree Row | p515 | |
518. Coin Change 2 | p518 | Vec |
519. Random Flip Matrix | p519 | Vec ,rand |
520. Detect Capital | p520 | String |
521. Longest Uncommon Subsequence I | p521 | |
522. Longest Uncommon Subsequence II | p522 | |
532. K-diff Pairs in an Array | p532 | HashMap |
537. Complex Number Multiplication | p537 | String.split |
539. Minimum Time Difference | p539 | Vec |
540. Single Element in a Sorted Array | p540 | |
553. Optimal Division | p553 | format! |
556. Next Greater Element III | p556 | |
558. Logical OR of Two Binary Grids Represented as Quad-Trees | p558 | |
563. Binary Tree Tilt | p563 | Option ,Rc ,RefCell ,abs |
564. Find the Closest Palindrome | p564 | FromStr ,Vec.extend ,Vec.extend_from_slice |
565. Array Nesting | p565 | |
575. Distribute Candies | p575 | HashMap ,std::cmp::min |
592. Fraction Addition and Subtraction p592 | ||
594. Longest Harmonious Subsequence | p594 | BTreeMap ,max |
598. Range Addition II | p598 | Vec ,min |
606. Construct String from Binary Tree | p606 | Rc ,RefCell |
622. Design Circular Queue | p622 | |
623. Add One Row to Tree | p623 | |
629. K Inverse Pairs Array | p629 | Vec |
630. Course Schedule III | p630 | Vec ,sort_by ,BinaryHeap |
638. Shopping Offers | p638 | Vec ,Reference ,std::cmp::min |
640. Solve the Equation | p640 | |
641. Design Circular Deque | p641 | |
646. Maximum Length of Pair Chain | p646 | |
648. Replace Words | p648 | |
652. Find Duplicate Subtrees | p652 | |
654. Maximum Binary Tree | p654 | |
655. Print Binary Tree | p655 | |
658. Find K Closest Elements | p658 | |
661. Image Smoother | p661 | const |
662. Maximum Width of Binary Tree | p662 | |
667. Beautiful Arrangement II | p667 | |
668. Kth Smallest Number in Multiplication Table | p668 | |
669. Trim a Binary Search Tree | p669 | |
670. Maximum Swap | p670 | |
676. Implement Magic Dictionary | p676 | |
677. Map Sum Pairs | p677 | HashMap ,PartialEq ,Eq ,Default |
682. Baseball Game | p682 | |
686. Repeated String Match | p686 | String ,contains |
687. Longest Univalue Path | p687 | |
689. Maximum Sum of 3 Non-Overlapping Subarrays | p689 | Vec |
693. Binary Number with Alternating Bits | p693 | >> |
698. Partition to K Equal Sum Subsets | p698 | |
699. Falling Squares | p699 | |
700. Search in a Binary Search Tree | p700 | Rc ,RefCell ,Option |
707. Design Linked List | p707 | |
709. To Lower Case | p709 | match |
710. Random Pick with Blacklist | p710 | |
717. 1-bit and 2-bit Characters | p717 | |
719. Find K-th Smallest Pair Distance | p719 | BTreeMap |
720. Longest Word in Dictionary | p720 | HashSet ,String.gt |
728. Self Dividing Numbers | p728 | HashSet ,String.gt |
729. My Calendar I | p729 | |
730. Count Different Palindromic Subsequences | p730 | |
731. My Calendar II | p731 | |
732. My Calendar III | p732 | |
735. Asteroid Collision | p735 | |
744. Find Smallest Letter Greater Than Target | p744 | |
745. Prefix and Suffix Search | p745 | |
747. Largest Number At Least Twice of Others | p747 | Vec |
748. Shortest Completing Word | p748 | Vec ,match |
754. Reach a Number | p754 | |
757. Set Intersection Size At Least Two | p757 | |
762. Prime Number of Set Bits in Binary Representation | p762 | |
768. Max Chunks To Make Sorted II | p768 | |
769. Max Chunks To Make Sorted | p769 | |
775. Global and Local Inversions | p775 | |
777. Swap Adjacent in LR String | p777 | |
779. K-th Symbol in Grammar | p779 | |
780. Reaching Points | p780 | |
784. Letter Case Permutation | p784 | |
786. K-th Smallest Prime Fraction | p786 | sort_by ,PartialOrd ,Ord ,PartialEq ,BinaryHeap ,Reverse |
788. Rotated Digits | p788 | |
790. Domino and Tromino Tiling | p790 | |
791. Custom Sort String | p791 | |
792. Number of Matching Subsequences | p792 | |
794. Valid Tic-Tac-Toe State | p794 | Vec |
795. Number of Subarrays with Bounded Maximum | p795 | |
796. Rotate String | p796 | |
798. Smallest Rotation with Highest Score | p798 | Vec |
799. Champagne Tower | p799 | |
804. Unique Morse Code Words | p804 | HashSet |
806. Number of Lines To Write String | p806 | |
807. Max Increase to Keep City Skyline | p807 | Vec |
809. Expressive Words | p809 | |
811. Subdomain Visit Count | p811 | |
812. Largest Triangle Area | p812 | f64 |
813. Largest Sum of Averages | p813 | |
814. Binary Tree Pruning | p814 | |
816. Ambiguous Coordinates | p816 | |
817. Linked List Components | p817 | |
819. Most Common Word | p819 | HashMap |
825. Friends Of Appropriate Ages | p825 | Vec |
827. Making A Large Island | p827 | |
829. Consecutive Numbers Sum | p829 | |
831. Masking Personal Information | p831 | |
838. Push Dominoes | p838 | Vec |
846. Hand of Straights | p846 | BTreeMap ,VecDeque ,FromIterator |
851. Loud and Rich | p851 | Vec |
852. Peak Index in a Mountain Array | p852 | Vec |
854. K-Similar Strings | p854 | |
855. Exam Room | p855 | |
856. Score of Parentheses | p856 | |
859. Buddy Strings | p859 | String |
868. Binary Gap | p868 | |
869. Reordered Power of 2 | p869 | HashSet ,BinaryHeap ,Reverse |
873. Length of Longest Fibonacci Subsequence | p873 | |
875. Koko Eating Bananas | p875 | |
878. Nth Magical Number | p878 | |
883. Projection Area of 3D Shapes | p883 | HashMap |
884. Uncommon Words from Two Sentences | p884 | HashMap ,String ,split |
886. Possible Bipartition | p886 | |
890. Find and Replace Pattern | p890 | |
895. Maximum Frequency Stack | p895 | |
899. Orderly Queue | p899 | |
897. Increasing Order Search Tree | p897 | |
901. Online Stock Span | p901 | |
904. Fruit Into Baskets | p904 | |
905. Sort Array By Parity | p905 | |
907. Sum of Subarray Minimums | p907 | |
908. Smallest Range I | p908 | |
911. Online Election | p911 | Vec ,HashMap ,binary_search ,match |
915. Partition Array into Disjoint Intervals | p915 | |
917. Number Of Ways To Reconstruct A Tree | p917 | Vec.swap |
919. Complete Binary Tree Inserter | p919 | |
921. Minimum Add to Make Parentheses Valid | p921 | |
926. Flip String to Monotone Increasing | p926 | |
927. Three Equal Parts | p927 | |
929. Unique Email Addresses | p929 | |
935. Knight Dialer | p935 | Vec |
937. Reorder Data in Log Files | p937 | Vec ,sort_by |
940. Distinct Subsequences II | p940 | |
942. DI String Match | p942 | |
944. Delete Columns to Make Sorted | p944 | |
946. Validate Stack Sequences | p944 | |
953. Verifying an Alien Dictionary | p953 | HashMap |
954. Array of Doubled Pairs | p954 | HashMap |
961. N-Repeated Element in Size 2N Array | p961 | |
965. Univalued Binary Tree | p965 | |
969. Pancake Sorting | p969 | Vec ,Slice |
970. Powerful Integers | p970 | |
997. Find the Town Judge | p997 | Vec |
982. Triples with Bitwise AND Equal To Zero | p982 | |
998. Maximum Binary Tree II | p998 | |
1003. Check If Word Is Valid After Substitutions | p1003 | |
1004. Max Consecutive Ones III | p1004 | |
1005. Maximize Sum Of Array After K Negations | p1005 | Vec ,sort ,binary_search ,min |
1009. Complement of Base 10 Integer | p1009 | >> ,<< |
1010. Pairs of Songs With Total Durations Divisible by 60 | p1010 | |
1015. Smallest Integer Divisible by K | p1015 | |
1016. Binary String With Substrings Representing 1 To N | p1016 | |
1017. Convert to Base -2 | p1017 | |
1019. Next Greater Node In Linked List | p1019 | |
1020. Number of Enclaves | p1020 | Vec |
1021. Remove Outermost Parentheses | p1021 | |
1023. Camelcase Matching | p1023 | |
1026. Maximum Difference Between Node and Ancestor | p1026 | |
1027. Longest Arithmetic Subsequence | p1027 | |
1033. Moving Stones Until Consecutive | p1033 | |
1034. Coloring A Border | p1034 | Vec |
1037. Valid Boomerang | p1037 | |
1039. Minimum Score Triangulation of Polygon | p1039 | |
1041. Robot Bounded In Circle | p1041 | |
1042. Flower Planting With No Adjacent | p1042 | |
1051. Height Checker | p1051 | |
1053. Previous Permutation With One Swap | p1051 | |
1054. Distant Barcodes | p1054 | |
1072. Flip Columns For Maximum Number of Equal Rows | p1072 | |
1073. Adding Two Negabinary Numbers | p1073 | |
1078. Occurrences After Bigram | p1078 | Vec ,String ,match-if |
1079. Letter Tile Possibilities | p1079 | |
1089. Duplicate Zeros | p1089 | |
1105. Filling Bookcase Shelves | p1105 | |
1106. Parsing A Boolean Expression | p1106 | |
1108. Defanging an IP Address | p1108 | |
1125. Smallest Sufficient Team | p1125 | |
1138. Alphabet Board Path | p1138 | |
1144. Decrease Elements To Make Array Zigzag | p1144 | |
1145. Binary Tree Coloring Game | p1145 | |
1154. Day of the Year | p1154 | match ,match-if ,const |
1161. Maximum Level Sum of a Binary Tree | p1161 | |
1175. Prime Arrangements | p1175 | |
1184. Distance Between Bus Stops | p1184 | |
1185. Day of the Week | p1185 | const |
1187. Make Array Strictly Increasing | p1187 | |
1189. Maximum Number of Balloons | p1189 | HashMap |
1200. Minimum Absolute Difference | p1200 | |
1217. Minimum Cost to Move Chips to The Same Position | p1218 | |
1218. Longest Arithmetic Subsequence of Given Difference | p1218 | Vec ,max ,HashMap |
1219. Path with Maximum Gold | p1219 | Vec |
1223. Remove Sub-Folders from the Filesystem | p1223 | |
1224. Maximum Equal Frequency | p1224 | HashMap |
1235. Maximum Profit in Job Scheduling | p1235 | |
1237. Find Positive Integer Solution for a Given Equation | p1237 | |
1238. Circular Permutation in Binary Representation | p1238 | |
1247. Minimum Swaps to Make Strings Equal | p1247 | |
1252. Cells with Odd Values in a Matrix | p1252 | |
1260. Shift 2D Grid | p1260 | |
1282. Group the People Given the Group Size They Belong To | p1282 | |
1302. Deepest Leaves Sum | p1302 | |
1331. Rank Transform of an Array | p1331 | |
1332. Remove Palindromic Subsequences | p1332 | String |
1335. Minimum Difficulty of a Job Schedule | p1335 | |
1342. Number of Steps to Reduce a Number to Zero | p1342 | |
1345. Jump Game IV | p1345 | HashMap ,HashSet ,VecDeque |
1351. Count Negative Numbers in a Sorted Matrix | p1351 | |
1373. Maximum Sum BST in Binary Tree | p1373 | |
1374. Generate a String With Characters That Have Odd Counts | p1374 | |
1376. Time Needed to Inform All Employees | p1376 | |
1380. Lucky Numbers in a Matrix | p1380 | Vec |
1385. Find the Distance Value Between Two Arrays | p1385 | |
1403. Minimum Subsequence in Non-Increasing Order | p1403 | |
1405. Longest Happy String | p1405 | BinaryHeap ,Vec |
1408. String Matching in an Array | p1408 | |
1413. Minimum Value to Get Positive Step by Step Sum | p1413 | |
1414. Find the Minimum Number of Fibonacci Numbers Whose Sum Is K | p1414 | binary_search |
1417. Reformat The String | p1417 | |
1419. Minimum Number of Frogs Croaking | p1419 | |
1422. Maximum Score After Splitting a String | p1422 | |
1436. Destination City | p1436 | String ,Vec ,HashMap |
1441. Build an Array With Stack Operations | p1441 | |
1446. Consecutive Characters | p1446 | String ,max |
1447. Simplified Fractions | p1447 | format! |
1450. Number of Students Doing Homework at a Given Time | p1450 | |
1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence | p1455 | |
1460. Make Two Arrays Equal by Reversing Sub-arrays | p1460 | |
1464. Maximum Product of Two Elements in an Array | p1464 | |
1470. Shuffle the Array | p1470 | |
1475. Final Prices With a Special Discount in a Shop | p1475 | |
1487. Making File Names Unique | p1487 | |
1518. Water Bottles | p1518 | |
1539. Kth Missing Positive Number | p1539 | |
1574. Shortest Subarray to be Removed to Make Array Sorted | p1574 | |
1576. Replace All ?'s to Avoid Consecutive Repeating Characters | p1576 | |
1582. Special Positions in a Binary Matrix | p1582 | |
1590. Make Sum Divisible by P | p1590 | |
1592. Rearrange Spaces Between Words | p1592 | |
1598. Crawler Log Folder | p1598 | |
1599. Maximum Profit of Operating a Centennial Wheel | p1599 | |
1601. Maximum Number of Achievable Transfer Requests | p1601 | count_ones ,iter.find |
1604. Alert Using Same Key-Card Three or More Times in a One Hour Period | p1604 | |
1605. Find Valid Matrix Given Row and Column Sums | p1605 | |
1608. Special Array With X Elements Greater Than or Equal X | p1608 | |
1609. Even Odd Tree | p1609 | Rc ,RefCell ,Vec |
1610. Maximum Number of Visible Points | p1610 | Vec ,sort_by ,std::f64::consts::PI ,partial_cmp ,atan2 |
1614. Maximum Nesting Depth of the Parentheses | p1614 | Vec(stack) |
1615. Maximal Network Rank | p1615 | |
1616. Split Two Strings to Make Palindrome | p1616 | |
1619. Mean of Array After Removing Some Elements | p1619 | |
1620. Coordinate With Maximum Network Quality | p1620 | |
1624. Largest Substring Between Two Equal Characters | p1624 | |
1626. Best Team With No Conflicts | p1626 | |
1629. Slowest Key | p1629 | Vec ,String |
1630. Arithmetic Subarrays | p1630 | |
1631. Path With Minimum Effort | p1631 | Vec ,BinaryHeap ,min ,max ,Reverse ,Tuple |
1636. Sort Array by Increasing Frequency | p1636 | |
1637. Widest Vertical Area Between Two Points Containing No Points | p1637 | |
1638. Count Substrings That Differ by One Character | p1638 | |
1640. Check Array Formation Through Concatenation | p1640 | |
1641. Count Sorted Vowel Strings | p1641 | |
1652. Defuse the Bomb | p1652 | |
1653. Minimum Deletions to Make String Balanced | p1654 | |
1656. Design an Ordered Stream | p1656 | |
1658. Minimum Operations to Reduce X to Zero | p1658 | |
1662. Check If Two String Arrays are Equivalent | p1662 | |
1663. Smallest String With A Given Numeric Value | p1663 | |
1664. Ways to Make a Fair Array | p1664 | |
1668. Maximum Repeating Substring | p1668 | |
1669. Merge In Between Linked Lists | p1669 | |
1672. Richest Customer Wealth | p1672 | Iter.map ,Iter.sum ,Iter.max |
1684. Count the Number of Consistent Strings | p1684 | |
1688. Count of Matches in Tournament | p1688 | |
1694. Reformat Phone Number | p1694 | |
1700. Number of Students Unable to Eat Lunch | p1700 | |
1704. Determine if String Halves Are Alike | p1704 | |
1705. Maximum Number of Eaten Apples | p1705 | Vec ,Reverse |
1706. Where Will the Ball Fall | p1706 | Vec |
1710. Maximum Units on a Truck | p1710 | |
1716. Calculate Money in Leetcode Bank | p1716 | |
1725. Number Of Rectangles That Can Form The Largest Square | p1725 | Vec |
1732. Find the Highest Altitude | p1732 | |
1742. Maximum Number of Balls in a Box | p1742 | |
1748. Sum of Unique Elements | p1748 | Vec |
1752. Check if Array Is Sorted and Rotated | p1752 | |
1750. Minimum Length of String After Deleting Similar Ends | p1750 | |
1753. Maximum Score From Removing Stones | p1753 | |
1754. Largest Merge Of Two Strings | p1754 | |
1758. Minimum Changes To Make Alternating Binary String | p1758 | |
1759. Count Number of Homogenous Substrings | p1759 | |
1760. Minimum Limit of Balls in a Bag | p1760 | |
1763. Longest Nice Substring | p1763 | String ,Slice |
1764. Form Array by Concatenating Subarrays of Another Array | p1764 | |
1765. Map of Highest Peak | p1765 | VecDeque |
1768. Merge Strings Alternately | p1768 | |
1769. Minimum Number of Operations to Move All Balls to Each Box | p1769 | |
1773. Count Items Matching a Rule | p1773 | |
1774. Closest Dessert Cost | p1774 | |
1775. Equal Sum Arrays With Minimum Number of Operations | p1775 | |
1779. Find Nearest Point That Has the Same X or Y Coordinate | p1779 | |
1780. Check if Number is a Sum of Powers of Three | p1780 p1780-go | pow |
1781. Sum of Beauty of All Substrings | p1781 | |
1784. Check if Binary String Has at Most One Segment of Ones | p1780 | |
1785. Minimum Elements to Add to Form a Given Sum | p1785 | |
1790. Check if One String Swap Can Make Strings Equal | p1790 | |
1791. Find Center of Star Graph | p1791 | |
1792. Maximum Average Pass Ratio | p1792 | |
1796. Second Largest Digit in a String | p1796 | |
1797. Design Authentication Manager | p1797 | |
1798. Maximum Number of Consecutive Values You Can Make | p1798 | |
1800. Maximum Ascending Subarray Sum | p1800 | |
1801. Number of Orders in the Backlog | p1801 | |
1802. Maximum Value at a Given Index in a Bounded Array | p1802 | |
1803. Count Pairs With XOR in a Range | p1803 | |
1805. Number of Different Integers in a String | p1805 | |
1806. Minimum Number of Operations to Reinitialize a Permutation | p1806 | |
1807. Evaluate the Bracket Pairs of a String | p1807 | |
1812. Determine Color of a Chessboard Square | p1812 | |
1813. Sentence Similarity III | p1813 | |
1814. Count Nice Pairs in an Array | p1814 | |
1816. Truncate Sentence | p1816 | String |
1817. Finding the Users Active Minutes | p1817 | |
1819. Number of Different Subsequences GCDs | p1819 | |
1823. Find the Winner of the Circular Game | p1823 | |
1824. Minimum Sideway Jumps | p1824 | |
1827. Minimum Operations to Make the Array Increasing | p1827 | |
1828. Queries on Number of Points Inside a Circle | p1828 | |
1832. Check if the Sentence Is Pangram | p1832 | |
1882. Sign of the Product of an Array | p1882 | |
1945. Sum of Digits of String After Convert | p1945 | |
1971. Find if Path Exists in Graph | p1971 | |
1984. Minimum Difference Between Highest and Lowest of K Scores | p1984 | Vec |
1995. Count Special Quadruplets | p1995 | String |
1996. The Number of Weak Characters in the Game | p1996 | Vec ,sort_by |
2000. Reverse Prefix of Word | p2000 | |
2006. Count Number of Pairs With Absolute Difference K | p2006 | |
2011. Final Value of Variable After Performing Operations | p2011 | |
2013. Detect Squares | p2013 | HashMap |
2016. Maximum Difference Between Increasing Elements | p2016 | Vec |
2022. Convert 1D Array Into 2D Array | p2022 | Vec |
2024. Maximize the Confusion of an Exam | p204 | |
2027. Minimum Moves to Convert String | p2027 | |
2028. Find Missing Observations | p2028 | Vec |
2029. Stone Game IX | p2022 | Vec |
2032. Two Out of Three | p2032 | |
2034. Stock Price Fluctuation | p2034 | BinaryHeap ,HashMap ,Reverse |
2037. Minimum Number of Moves to Seat Everyone | p2037 | |
2038. Remove Colored Pieces if Both Neighbors are the Same Color | p2038 | |
2039. The Time When the Network Becomes Idle | p2039 | VecDeque |
2040. Most Frequent Even Element | p2040 | |
2042. Check if Numbers Are Ascending in a Sentence | p2042 | |
2043. Simple Bank System | p2043 | |
2044. Count Number of Maximum Bitwise-OR Subsets | p2044 | HashMap ,HashSet |
2047. Number of Valid Words in a Sentence | p2047 | BinaryHeap ,HashMap ,Reverse |
2049. Count Nodes With the Highest Score | p2049 | BTreeMap ,HashMap ,VecDeque |
2055. Plates Between Candles | p2055 | Vec.binary_search |
2100. Find Good Days to Rob the Bank | p2100 | Vec |
2104. Sum of Subarray Ranges | p2104 | |
2180. Count Integers With Even Digit Sum | p2180 | |
2283. Check if Number Has Equal Digit Count and Digit Value | p2283 | |
2287. Rearrange Characters to Make Target String | p2287 | |
2293. Min Max Game | p2293 | |
2299. Strong Password Checker II | p2299 | |
2303. Calculate Amount Paid in Taxes | p2303 | |
2309. Greatest English Letter in Upper and Lower Case | p2309 | |
2315. Count Asterisks | p2315 | |
2319. Check if Matrix Is X-Matrix | p2319 | |
2325. Decode the Message | p2325 | |
2331. Evaluate Boolean Binary Tree | p2331 | |
2335. Minimum Amount of Time to Fill Cups | p2335 | |
2351. First Letter to Appear Twice | p2351 | |
2347. Best Poker Hand | p2347 | |
2357. Make Array Zero by Subtracting Equal Amounts | p2357 | |
2363. Merge Similar Items | p2363 | |
2367. Number of Arithmetic Triplets | p2367 | |
2373. Largest Local Values in a Matrix | p2373 | |
2379. Minimum Recolors to Get K Consecutive Black Blocks | p2379 | |
2383. Minimum Hours of Training to Win a Competition | p2383 | |
2389. Longest Subsequence With Limited Sum | p2389 | |
2395. Find Subarrays With Equal Sum | p2395 | |
2399. Check Distances Between Same Letters | p2399 | |
2409. Count Days Spent Together | p2409 | |
2413. Smallest Even Multiple | p2413 | |
2418. Sort the People | p2418 | |
2423. Remove Letter To Equalize Frequency | p2423 | |
2427. Number of Common Factors | p2427 | |
2432. The Employee That Worked on the Longest Task | p2432 | |
2437. Number of Valid Clock Times | p2437 | |
2441. Largest Positive Integer That Exists With Its Negative | p2441 | |
2446. Determine if Two Events Have Conflict | p2446 | |
2469. Convert the Temperature | p2469 | |
2488. Count Subarrays With Median K | p2488 |
Problem | Solution | Related Rust keywords |
---|---|---|
01.02. Check Permutation LCCI | p0105 | |
01.05. One Away LCCI | p0105 | |
01.08. Zero Matrix LCCI | p0108 | |
05.02. Binary Number to String LCCI | p0502 | |
17.05. Find Longest Subarray LCCI | p1705 | |
17.11. Find Closest LCCI | p1711 | |
17.19. Missing Two LCCI | p1719 |
Problem | Solution | Related Rust keywords |
---|---|---|
剑指 Offer II 001. 整数除法 | p001 | abs |
剑指 Offer 03. 数组中重复的数字 | offer03 | |
剑指 Offer 04. 二维数组中的查找 | offer04 | |
剑指 Offer 06. 从尾到头打印链表 | offer06 | |
剑指 Offer 47. 礼物的最大价值 | offer47 |
|剑指 Offer II 029. 排序的循环链表|offer029|| |剑指 Offer II 041. 滑动窗口的平均值|offerII041|| |剑指 Offer II 091. 粉刷房子|p091|| |剑指 Offer II 115. 重建序列|p115||
Problem | Solution | Related Rust keywords |
---|---|---|
LCP 33. 蓄水 | lcp33 |