diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cd17a1f..32f4aa2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,6 +9,7 @@ We are happy to welcome all the contributions from anyone willing to improve thi - Enhancements in the exisiting code-snippets or Notes - More ideas are welcomed! +#drftgyhujiko # Submitting Contributions👩‍💻👨‍💻 Below you will find the process and workflow used to review and merge your changes. ## Step 0 : Find an issue diff --git a/DSA/Arrays/BubbleSort.js b/DSA/Arrays/BubbleSort.js index c37a9d6..f5093ef 100644 --- a/DSA/Arrays/BubbleSort.js +++ b/DSA/Arrays/BubbleSort.js @@ -15,10 +15,10 @@ } } } - console.log(arr); + console.log(arr); vishwaMehta30 } -var arr = [234, 43, 55, 63, 5, 6, 235, 547]; +var arr = [234, 43, 55, 63, 5, 6, 235, 547,32423,343,34]; // call the function bblSort(arr); \ No newline at end of file diff --git a/DSA/Miscelleneous/balancedparentesis b/DSA/Miscelleneous/balancedparentesis new file mode 100644 index 0000000..3953388 --- /dev/null +++ b/DSA/Miscelleneous/balancedparentesis @@ -0,0 +1,19 @@ + +let isBalanced = (input) => { + + let brackets = "[]{}()<>" + let stack = [] + + for(let bracket of input) { + let bracketsIndex = brackets.indexOf(bracket) + + // if bracket is an opening bracket + if(bracketsIndex % 2 === 0) { + // push the closing bracket onto the stack + stack.push(bracketsIndex + 1) + } else { + //do something + } + } + return true ? true : false +} \ No newline at end of file