Skip to content

feat: add Rust solution to lc problem: No.1096 - #6201

Merged
yanglbme merged 2 commits into
doocs:mainfrom
vremyavnikuda:feat/1096-rust-solution
Oct 18, 2026
Merged

yanglbme merged 2 commits into
doocs:mainfrom
vremyavnikuda:feat/1096-rust-solution

Conversation

@vremyavnikuda

Copy link
Copy Markdown
Contributor

Summary

Type

  • New solution
  • Update solution
  • Docs
  • Other

Checklist

For new or updated solutions:

  • README.md / README_EN.md follow solution/template.md
  • If a Thinking block is added, it sits after the method heading, is non-empty, and matches the code in the repo (naive idea vs constraints, bottleneck, key observation, why this method). Thinking is optional.
  • All languages implement the same algorithm; unrelated Solution.* files and code tabs are unchanged
  • Code is formatted as described in AGENTS.md

@idoocs idoocs added md Issues or Pull requests relate to .md files rs Issues or Pull requests relate to .rs code labels Oct 17, 2026
Match the identifiers and control flow used by the other languages,
and place the Rust tab after the existing language blocks.
@yanglbme

Copy link
Copy Markdown
Member

The naming and tab order did not match the other languages for this problem. That is fixed in the follow-up commit on this PR.

Issues

  • The helper and locals were named asd, aa, bb, cc, dd, and ee. The Python, Java, C++, Go, and TypeScript solutions use dfs, exp, j, i, a, b, c, and s.
  • The Rust block was inserted before Go. For method one the order is Python3, Java, C++, Go, TypeScript, so Rust belongs after TypeScript.

Changes

  • dfs(exp) finds the first } and its matching {. The prefix, option, and suffix are a, b, and c. Each expansion is inserted into the set s, which is then returned in sorted order.
  • Only method one was changed. The Rust block in README.md and README_EN.md now sits after TypeScript and matches Solution.rs.

@doocs doocs deleted a comment from cursor Bot Oct 18, 2026
@yanglbme
yanglbme merged commit d3bc2bb into doocs:main Oct 18, 2026
5 checks passed
@vremyavnikuda
vremyavnikuda deleted the feat/1096-rust-solution branch October 19, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

md Issues or Pull requests relate to .md files rs Issues or Pull requests relate to .rs code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants