MCPcopy Create free account
hub / github.com/StudyRust/leetcode_rust / is_nice

Function is_nice

1763-longest-nice-substring.rs:2–8  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

1pub fn longest_nice_substring(s: String) -> String {
2 fn is_nice(s: &str) -> bool {
3 let mut a = s.to_string().chars().collect::<Vec<char>>();
4 a.sort_unstable();
5 a.dedup();
6 println!("{:?}", a);
7 true
8 }
9 for i in 0..s.len()-1 {
10 for j in i+1..s.len() {
11 let a = &s[i..j];

Callers 1

longest_nice_substringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected