mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 08:16:50 +08:00
@ -26,7 +26,6 @@ export function PermutationinString (s1, s2) {
|
|||||||
while (end < s2.length - 1) {
|
while (end < s2.length - 1) {
|
||||||
if (equals(s1Set, s2Set)) return true
|
if (equals(s1Set, s2Set)) return true
|
||||||
end++
|
end++
|
||||||
console.log(s2[start], s2[end], equals(s1Set, s2Set))
|
|
||||||
const c1 = s2[start]
|
const c1 = s2[start]
|
||||||
const c2 = s2[end]
|
const c2 = s2[end]
|
||||||
if (s2Set[c1] > 0) s2Set[c1]--
|
if (s2Set[c1] > 0) s2Set[c1]--
|
||||||
|
Reference in New Issue
Block a user