Skip to content

rromanv/leetcode-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Typescript

Personal solutions of LeetCode problems on TypeScript.

Installation

git clone git@github.com:rromanv/leetcode-ts.git
pnpm install

Usage

pnpm test <number>

Problems

LeetCode Problem Solution Test Difficulty
1. Two Sum 1.ts 1.spec.ts Easy
14. Longest Common Prefix 14.ts 14.spec.ts Easy
20. Valid Parentheses 20.ts 20.spec.ts Easy
21. Merge Two Sorted Lists 21.ts 21.spec.ts Easy
19. Remove Nth Node From End of List 19.ts 19.spec.ts Medium
23. Merge k Sorted Lists 23.ts 23.spec.ts Hard
26. Remove Duplicates from Sorted Array 26.ts 26.spec.ts Easy
34. Find First and Last Position of Element in Sorted Array 34.ts 34.spec.ts Medium
50. Pow(x, n) 50.ts 50.spec.ts Medium
56. Merge Intervals 56.ts 56.spec.ts Medium
65. Valid Number 65.ts 65.spec.ts Hard
71. Simplify Path 71.ts 71.spec.ts Medium
76. Minimum Window Substring 76.ts 76.spec.ts Hard
88. Merge Sorted Array 88.ts 88.spec.ts Easy
121. Best Time to Buy and Sell Stock 121.ts 121.spec.ts Easy
125. Valid Palindrome 125.ts 125.spec.ts Easy
129. Sum Root to Leaf Numbers 129.ts 129.spec.ts Medium
133. Clone Graph 133.ts 133.spec.ts Medium
138. Copy List with Random Pointer 138.ts 138.spec.ts Medium
162. Find Peak Element 162.ts 162.spec.ts Medium
146. LRU Cache 146.ts 146.spec.ts Medium
199. Binary Tree Right Side View 199.ts 199.spec.ts Medium
200. Number of Islands 200.ts 200.spec.ts Medium
219. Contains Duplicate II 219.ts 219.spec.ts Easy
215. Kth Largest Element in an Array 215.ts 215.spec.ts Medium
227. Basic Calculator II 227.ts 227.spec.ts Medium
236. Lowest Common Ancestor of a Binary Tree 236.ts 236.spec.ts Medium
249. Group Shifted Strings 249.ts 249.spec.ts MediumPremium
270. Closest Binary Search Tree Value 270.ts 270.spec.ts EasyPremium
314. Binary Tree Vertical Order Traversal 314.ts 314.spec.ts MediumPremium
339. Nested List Weight Sum 339.ts 339.spec.ts MediumPremium
346. Moving Average from Data Stream 346.ts 346.spec.ts EasyPremium
347. Top K Frequent Elements 347.ts 347.spec.ts Medium
398. Random Pick Index 398.ts 398.spec.ts Medium
408. Valid Word Abbreviation 408.ts 408.spec.ts EasyPremium
415. Add Strings 415.ts 415.spec.ts Easy
498. Diagonal Traverse 498.ts 498.spec.ts Medium
528. Random Pick with Weight 528.ts 528.spec.ts Medium
543. Diameter of Binary Tree 543.ts 543.spec.ts Easy
560. Subarray Sum Equals K 560.ts 560.spec.ts Medium
636. Exclusive Time of Functions 636.ts 636.spec.ts Medium
670. Maximum Swap 670.ts 670.spec.ts Medium
680. Valid Palindrome II 680.ts 680.spec.ts Easy
695. Max Area of Island 695.ts 695.spec.ts Medium
708. Insert into a Sorted Circular Linked List 708.ts 708.spec.ts MediumPremium
824. Goat Latin 824.ts 824.spec.ts Easy
791. Custom Sort String 791.ts 791.spec.ts Medium
827. Making A Large Island 827.ts 827.spec.ts Hard
938. Range Sum of BST 938.ts 938.spec.ts Easy
921. Minimum Add to Make Parentheses Valid 921.ts 921.spec.ts Medium
973. K Closest Points to Origin 973.ts 973.spec.ts Medium
986. Interval List Intersections 986.ts 986.spec.ts Medium
987. Vertical Order Traversal of a Binary Tree 987.ts 987.spec.ts Hard
1004. Max Consecutive Ones III 1004.ts 1004.spec.ts Medium
1047. Remove All Adjacent Duplicates In String 1047.ts 1047.spec.ts Easy
1091. Shortest Path in Binary Matrix 1091.ts 1091.spec.ts Medium
1249. Minimum Remove to Make Valid Parentheses 1249.ts 1249.spec.ts Medium
1570. Dot Product of Two Sparse Vectors 1570.ts 1570.spec.ts MediumPremium
1539. Kth Missing Positive Number 1539.ts 1539.spec.ts Easy
1650. Lowest Common Ancestor of a Binary Search Tree III 1650.ts 1650.spec.ts MediumPremium
1762. Buildings With an Ocean View 1762.ts 1762.spec.ts MediumPremium
1768. Merge Strings Alternately 1768.ts 1768.spec.ts Easy

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks