Skip to content

Solutions to leetcode problems written in rust.

License

Notifications You must be signed in to change notification settings

evxn/leetcode-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode-rust

Solutions to leetcode problems written in rust.

Run

Each solution is a lib crate. To test all the solutions at once run this shell command in the repo folder:

$ cargo test

To test an individual solution go to the corresponding folder and execute the same cargo test command.

Table of Contents

Problem Category
238. Product of Array Except Self Array, PrefixProduct
271. Encode and Decode Strings String, Design
347. Top K Frequent Elements Array, HashMap, BucketSort
328. Odd Even Linked List LinkedList
2. Add Two Numbers LinkedList
146. LRU Cache LinkedList, HashMap
49. Group Anagrams String, BTree, HashMap
5. Longest Palindromic Substring String
3. Longest Substring Without Repeating Characters String
94. Binary Tree Inorder Traversal BinaryTree
102. Binary Tree Level Order Traversal BinaryTree
105. Construct Binary Tree from Preorder and Inorder Traversal BinaryTree
199. Binary Tree Right Side View BinaryTree
226. Invert Binary Tree BinaryTree
104. Maximum Depth of Binary Tree BinaryTree
110. Balanced Binary Tree BinaryTree
543. Diameter of Binary Tree BinaryTree
100. Same Tree BinaryTree
572. Subtree of Another Tree BinaryTree
1448. Count Good Nodes in Binary Tree BinaryTree
236. Lowest Common Ancestor of a Binary Tree BinaryTree
235. Lowest Common Ancestor of a Binary Search Tree BinarySearchTree
98. Validate Binary Search Tree BinarySearchTree
230. Kth Smallest Element in a BST BinarySearchTree
200. Number of Islands Graph
15. 3Sum Array
38. Count and Say Array
73. Set Matrix Zeroes Array
42. Trapping Rain Water Array
334. Increasing Triplet Subsequence Array
36. Valid Sudoku Array, HashMap
128. Longest Consecutive Sequence Array, HashMap

About

Solutions to leetcode problems written in rust.

Resources

License

Stars

Watchers

Forks

Languages