fix: replace url with empty array in solution (#36380)
This commit is contained in:
committed by
Parth Parth
parent
ec4350b2bf
commit
8ee2e5eaa9
@ -97,11 +97,11 @@ A way to visualize this is by considering a tree that starts with the first char
|
|||||||
function permAlone(str) {
|
function permAlone(str) {
|
||||||
|
|
||||||
// Create a regex to match repeated consecutive characters.
|
// Create a regex to match repeated consecutive characters.
|
||||||
var regex = /(.)\1+/g;
|
var regex = /(.)\1+/;
|
||||||
|
|
||||||
// Split the string into an array of characters.
|
// Split the string into an array of characters.
|
||||||
var arr = str.split('');
|
var arr = str.split('');
|
||||||
var permutations = <a href='https://forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=3 ":rocket:"' target='_blank' rel='nofollow'>];
|
var permutations = [];
|
||||||
var tmp;
|
var tmp;
|
||||||
|
|
||||||
// Return 0 if str contains same character.
|
// Return 0 if str contains same character.
|
||||||
|
Reference in New Issue
Block a user