Skip to content

Instantly share code, notes, and snippets.

Sunil B N connecttobn

Block or report user

Report or block connecttobn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View generateCombinationsOfBraces.js
var cleverBrace = function(prefix, suffix, n, result) {
if (n % 2 !== 0) return;
if (n == 2) {
var val = prefix + "()" + suffix;
if (result.indexOf(val) === -1) {
result.push(val);
}
} else if (n > 2) {
cleverBrace(prefix + "(", ")" + suffix, n - 2, result);
cleverBrace(prefix + "()", suffix, n - 2, result);
View createPassword
var createPassowrd = function(){
var password = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@!_0123456789";
for( var i=0; i < 9; i++ )
password += possible.charAt(Math.floor(Math.random() * possible.length));
return password;
};
You can’t perform that action at this time.