Solutions of algorithm problems using Javascript. https://ignacio-chiazzo.github.io/Algorithms-Leetcode-Javascript/
The solutions are located under /LeetcodeProblems. Each solutions exports the main function(s) which to be tested. Each problem has a test file located under /LeetcodeProblemsTest.
To run all the test run node Main.js in the console.
To run a specific problem in your console, go to the file test, add the call to the test function (test() ) and run in the console node <problem_file_path> (e.g. node LeetcodeProblems/Lowest_Common_Ancestor_of_a_Binary_Tree.js).
| Algoritmhs |
|---|
| Heap Sort |
| Problems | Level | Link |
|---|---|---|
| Human Traffic of Stadium |
| Human Traffic of Stadium | Hard | https://leetcode.com/problems/human-traffic-of-stadium | | Rank Scores | Medium | https://leetcode.com/problems/rank-scores | | Consecutive Numbers | Medium | https://leetcode.com/problems/consecutive-numbers | | Department Highest Salary | Medium | https://leetcode.com/problems/department-highest-salary | | Exchange Seats | Medium | https://leetcode.com/problems/exchange-seats | | Nth Highest Salary | Medium | https://leetcode.com/problems/nth-highest-salary | | Combine Two Tables | Easy | https://leetcode.com/problems/combine-two-tables | | Second Highest Salary| Easy | https://leetcode.com/problems/second-highest-salary | | Customers Who Never Order| Easy | https://leetcode.com/problems/customers-who-never-order | | Reformat Department Table | Easy | https://leetcode.com/problems/reformat-department-table | | Employees Earning More Than Their Managers | Easy | https://leetcode.com/problems/employees-earning-more-than-their-managers/ | | Delete Duplicate Emails | Easy | https://leetcode.com/problems/delete-duplicate-emails | | Rising Temperature | Easy | https://leetcode.com/problems/rising-temperature |
Other languages provides built-in classes (e.g Linked List, Tree, etc). This module contains util classes to use in your problems.
If you want to contribute to this repo by adding a problem you should:
- Add the description of the problem at the top of the file.
- Add a test file with some test cases. The test file must export a
test()function which should run all the tests of the file. - Add your problem to the Readme so that your problem shows up in the list of solutions.