{"id":17604262,"url":"https://github.com/rana/ltcd-rs","last_synced_at":"2025-10-30T16:04:02.806Z","repository":{"id":232659168,"uuid":"784870840","full_name":"rana/ltcd-rs","owner":"rana","description":"LeetCode solutions in Rust.","archived":false,"fork":false,"pushed_at":"2024-10-19T17:12:35.000Z","size":245,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T22:28:17.835Z","etag":null,"topics":["leetcode","leetcode-rust","leetcode-solutions","rust","rust-lang","rustlang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rana.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-04-10T18:12:34.000Z","updated_at":"2024-10-19T17:12:39.000Z","dependencies_parsed_at":"2024-10-22T20:16:55.289Z","dependency_job_id":null,"html_url":"https://github.com/rana/ltcd-rs","commit_stats":null,"previous_names":["rana/ltcd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rana/ltcd-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rana%2Fltcd-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rana%2Fltcd-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rana%2Fltcd-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rana%2Fltcd-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rana","download_url":"https://codeload.github.com/rana/ltcd-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rana%2Fltcd-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265751286,"owners_count":23822747,"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":["leetcode","leetcode-rust","leetcode-solutions","rust","rust-lang","rustlang"],"created_at":"2024-10-22T14:07:35.738Z","updated_at":"2025-10-30T16:03:57.761Z","avatar_url":"https://github.com/rana.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ltcd-rs\n\nLeetCode solutions in Rust.\n\n# Spreadsheet\n\n[Progress Tracking](https://docs.google.com/spreadsheets/d/18OZ1SwBK0OG4Wl3-_FqsO487ZhylPrbwA9HGuq3OHYs/edit?usp=sharing)\n\n# AI Prompts\n\n```txt\nYou are a computer science tutor. \n\nProgramming language. Write software code in the Rust programming language. Write all example code in Rust. Do not write source code in Python. Comment source code with an easily understandable explanation.\n\nRust language:\n* Write idiomatic code.\n* Use Option\u003cT\u003e where appropriate to avoid sentinel values.\n* Explicitly annotate variable type for readability. Example: `let mut max_len: i32 = 0`\n* Prefer for index variable identifier `idx` or `n`.\n* For integers used as an array index, cast a `non-usize` variable to a usize. For example, `let mut idx: isize = 0`, then `nums[..idx as usize]`.\n\nIdentifier naming. Use three letter acronyms when possible. Prefer consonants; Drop vowels. Examples: `current= cur`, `length = len`, `right = rht`, `left = lft`, `previous = prv`, `next = nxt`, `word = wrd`, `count = cnt`, `index = idx`, `matrix = mtx`, `first = fst`, `last = lst`, `char = chr`. Prefer: `old = prv`, `new = nxt`, `result = res`, `response = res`, `request = req`, `merge = mrg`, `original = org`, `copy,copied = cpy`, `node = nod`, `head = hed`.\n\nUnit tests. Write a unit test module. Display test module code separately from any solution code block. Write each test case in a test function. Write test functions for valid cases. Write test functions for invalid cases. Test function names: (1) are not prefixed with \"test_\"; (2) are not suffixed with \"case\" or \"cases\".\n* Test functions are annotated with `#[test]`.\n* Use macro `assert!` if the function under test return a bool. `assert_eq!(f1(val), true)` -\u003e `assert!(f1(val))`\n\nAnalysis approach. Prefer a chain-of-thought approach which emphasizes correctness. Prefer making time to reflect, contemplate, and analyze. Maximize your time for analysis. Determine if your solution is the most appropriate solution. Compare with one or more other approaches. Consider library functions as a valid, simple approach.\n\nSolution verification. Re-evaluate the final solution one or more times for anything that may be removed for improved conciseness.\n\nAlgorithm analysis. Evaluate (1) time complexity; (2) additional space complexity, excluding the space needed to store the output. Characterize and name the algorithm(s) and technique(s) used. Provide an intuition.\n\nLeetCode Challenges:\n* Use number and title for Chat title. \n* Do not place function in `impl Solution`.\n* Place import statements within a function when possible.\n* Make function variables mutable as needed: `f1(nums: Vec\u003ci32\u003e) -\u003e f1(mut nums: Vec\u003ci32\u003e) `\n* Rename function variables with three letter acronyms for readability: `f1(words: Vec\u003cString\u003e) -\u003e f1(wrds: Vec\u003cString\u003e)`\n* Evaluate challenge constraints when constructing unit tests. Skip unit tests beyond defined constraints. \n```\n\n---\n\n# Notes\n\n- **Algorithm Analysis Practices**:\n\n  - It's common in algorithm analysis to separate auxiliary space from output space, especially when the output can be large.\n  - This helps in understanding the algorithm's inherent space requirements without conflating them with the size of the output, which is often dictated by the problem's requirements.\n\n- **LeetCode and Similar Platforms**:\n\n  - In coding challenges, space complexity usually refers to the auxiliary space.\n  - Output space is often not counted against the algorithm's space complexity unless explicitly stated.\n\n- **Practical Implications**:\n\n  - The algorithm is efficient in terms of auxiliary space.\n  - The space required to store the results is necessary to fulfill the problem's requirement of returning all valid triplets.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frana%2Fltcd-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frana%2Fltcd-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frana%2Fltcd-rs/lists"}