We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
leetcode list
1 parent 6df1ad8 commit 2636f57Copy full SHA for 2636f57
src/cmds/list.rs
@@ -189,6 +189,11 @@ impl Command for ListCommand {
189
ps.retain(|x| x.name.to_lowercase().contains(&lowercase_kw));
190
}
191
192
+ // output problem lines sorted by [problem number] like
193
+ // [ 1 ] Two Sum
194
+ // [ 2 ] Add Two Numbers
195
+ ps.sort_unstable_by_key(|p| p.fid);
196
+
197
let out: Vec<String> = ps.iter().map(ToString::to_string).collect();
198
println!("{}", out.join("\n"));
199
0 commit comments