{"id":18233391,"url":"https://github.com/grimmerk/algorithms-vscode","last_synced_at":"2025-04-03T19:31:04.260Z","repository":{"id":78675814,"uuid":"133110361","full_name":"grimmerk/algorithms-vscode","owner":"grimmerk","description":"All are written in Python 3. Some also have Go, JavaScript (Node.js), C#, C++ versions. Include test cases. To be convenient, often not follow Python pep8 snake coding style. IDE: VS Code \u0026 Atom. Include data structures, LeetCode problems. Convenient debugging by VSCode Setting","archived":false,"fork":false,"pushed_at":"2021-01-28T08:59:18.000Z","size":119,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T15:45:10.743Z","etag":null,"topics":["c-sharp","cpp","dotnet-core","jest","mstest","pytest","unit-test","visual-studio-code"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grimmerk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-12T03:25:58.000Z","updated_at":"2022-06-06T07:33:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"8bdb89af-0ad7-4405-a655-f48d313edae1","html_url":"https://github.com/grimmerk/algorithms-vscode","commit_stats":null,"previous_names":["grimmerk/algorithms-vscode"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimmerk%2Falgorithms-vscode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimmerk%2Falgorithms-vscode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimmerk%2Falgorithms-vscode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimmerk%2Falgorithms-vscode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grimmerk","download_url":"https://codeload.github.com/grimmerk/algorithms-vscode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247065161,"owners_count":20877718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","cpp","dotnet-core","jest","mstest","pytest","unit-test","visual-studio-code"],"created_at":"2024-11-04T15:04:23.624Z","updated_at":"2025-04-03T19:31:04.249Z","avatar_url":"https://github.com/grimmerk.png","language":"Python","readme":"Some other coding problems in my inteviews\n\n1. reverse a string\n2. judge if a string is the substring of another string\n3. Hanoi tower\n4. use two stacks to implement a queue (pseudo code), https://leetcode.com/problems/implement-stack-using-queues/\n\nSome questions in my interviews\n1. time complexity of merge sort\n2. what is the quickest search\n3. what is the worse case of hash table\n4. mouse maze, similar to LeetCode-490 The Maze (medium): https://leetcode.com/articles/the-maze/\n5. TicTacToe (LeetCode, my AI side project and React official site)\n\nSome other interesting problems\n1. (Meta string) Checking if two strings contain the same characters regardless of order\n2. Regular Expression Puzzle: http://jimbly.github.io/regex-crossword\n\n## LeetCode favorite list\n\n- easy(12): https://leetcode.com/list/1emvu11\n- medium(12): https://leetcode.com/list/1emw747\n- hard(12): https://leetcode.com/list/1emdws5\n\n`12` in `easy(12)` means that the first 12 problems in the list are in the first 200 leetcode problems which are used frequently.\n\n## Tips on LeetCode\n\nDo not uncomment some pre-definition classes which are defined somewhere already, the system comments are just exploration e.g.\n\n```\n# Definition for singly-linked list.\n# class ListNode:\n#     def __init__(self, x):\n#         self.val = x\n#         self.next = None\n```\n\n## interesting skills\n\ntwo pointer method (caterpillar method), e.g:\n- https://app.codility.com/programmers/lessons/15-caterpillar_method/\n- https://leetcode.com/articles/two-pointer-technique/\n- https://www.geeksforgeeks.org/find-number-of-triangles-possible/\n\nSometimes it is used in linked-list problems.\n\n## Node.js\n\nInstall:\n- yarn install\n\nTest:\n- yarn test (find all `*.test.js` in the root folder)\n- yarn test specific_folder (only that folder)\n\nTodo:\n1. (breakpoint) debugging while using Jest\n\n## Python\n\nInstall:\n- pip install -U pytest\n\nTest:\n- pytest -s (find all `*-*.py test_*.py` files in the current folder)\n- pytest -s single_file (only that file)\n\n## Go\n\nRun:\n1. in each folder, execute `go build`/`go build xxx.go` and executed the generated binary file\n\nTest:\n1. execute `go test xxx_test.go` or `go *.go` to test 1 file/folder\n2. in root folder, `go test ./...` to test all sub folders. **Issue:** it will fail if any folder has c/cpp files. Use `CGO_ENABLED=0 go test ./...` if this happen.\n\n## How to debug Python, Go and Node.js with breakpoints\n\nSelect the file in VS code, then select the cooresponding config in Debug panel to launch.\n\n## Build and Debug C++ (experimental)\n\nTake `LeetCodeTests/1-twoSum.cpp` as an example.\n\n- ~~in terminal, type `g++ -g 1-twoSum.cpp`, then `a.out` (default name) will be generated.~~\n- select this file in VS code, then choose `C++: currentFile_build-debug` in Debug panel to build+launch.\n\n`.vscode/launch.json or tasks.json` are for macOS, please read https://code.visualstudio.com/docs/languages/cpp to modify the cpp part of them if yours OS is not macOS.\n\n**issue**\n\n- need a framework to test all\n\n## `C#`\n\n**Installation**\n\nFollow https://docs.microsoft.com/zh-tw/dotnet/core/tutorials/with-visual-studio-code to install .NET Core SDK and VSCode extension.\n\nThen `dotnet restore` to install project dependencies.\n\n**Dev**\n\nMake your classes like `LeetCodeTests/Solution1.cs`, rules:\n1. class name is the same as file name.\n2. no duplicate file names.\n3. write your test case in `test_solution` function.\n4. (optional) add `[TestClass]` and `[TestMethod]` for run_all_tests runner.\n\n**Debug**\n\n- select this file in VS code, then choose `.NET Core: Current File` in Debug panel to build+launch.\n\n**Run all tests at once**\n\n- execute `dotnet test` to run all tests function which have ``[TestMethod]``\n\n**The current C# namespace defined in the project is not aligned with the folder structure**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrimmerk%2Falgorithms-vscode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrimmerk%2Falgorithms-vscode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrimmerk%2Falgorithms-vscode/lists"}