From 6788c8ccfdcc4339bfa085a27ff78111cbd3c3ec Mon Sep 17 00:00:00 2001 From: Nikhil Date: Mon, 14 Feb 2022 12:22:43 +0530 Subject: [PATCH 1/9] match 3 completed --- Match 03/index.html | 2 +- Match 03/submissions/base.js | 39 +++++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/Match 03/index.html b/Match 03/index.html index e42844c..8bdbad2 100644 --- a/Match 03/index.html +++ b/Match 03/index.html @@ -8,7 +8,7 @@ h1, h2 { margin: 0 0 1em; } - input { + input { margin: 0 4px 8px 0; padding: 4px; } diff --git a/Match 03/submissions/base.js b/Match 03/submissions/base.js index 96f8d4a..de363cd 100644 --- a/Match 03/submissions/base.js +++ b/Match 03/submissions/base.js @@ -1,3 +1,40 @@ function solution(a, b) { - return false; + + if(a.length!=b.length) + return false + + let map1 = {}; + + console.log(map1); + + for(let i=0;i Date: Mon, 14 Feb 2022 12:45:01 +0530 Subject: [PATCH 2/9] match3 complete --- Match 03/submissions/base.js | 40 +++++++----------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/Match 03/submissions/base.js b/Match 03/submissions/base.js index de363cd..846d3ab 100644 --- a/Match 03/submissions/base.js +++ b/Match 03/submissions/base.js @@ -1,40 +1,14 @@ function solution(a, b) { - - if(a.length!=b.length) - return false - - let map1 = {}; - console.log(map1); - - for(let i=0;i Date: Mon, 14 Feb 2022 12:55:50 +0530 Subject: [PATCH 3/9] match3 special functionality updated --- Match 03/submissions/base.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Match 03/submissions/base.js b/Match 03/submissions/base.js index 846d3ab..84f37a6 100644 --- a/Match 03/submissions/base.js +++ b/Match 03/submissions/base.js @@ -1,14 +1,11 @@ function solution(a, b) { - let arr1=[...a]; - let arr2=[...b]; - arr1.sort(); - arr2.sort(); - - for(let i=0;i\/?~]/; + let bool1 = specialChars.test(a); + let bool2 = specialChars.test(b); + if(bool1 || bool2) + return false; + let arr1=[...a].join(""); + let arr2=[...b].join(""); + return !arr1.localeCompare(arr2) } \ No newline at end of file From 5e9252bbea13fb64d91f7348315e199988d50819 Mon Sep 17 00:00:00 2001 From: Nikhil Date: Mon, 14 Feb 2022 15:45:34 +0530 Subject: [PATCH 4/9] match 2 try --- Match 02/submissions/base.js | 22 +++++++++++++++++++++- Match 03/submissions/base.js | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Match 02/submissions/base.js b/Match 02/submissions/base.js index c8abba4..af25d87 100644 --- a/Match 02/submissions/base.js +++ b/Match 02/submissions/base.js @@ -1,5 +1,5 @@ function solution() { - return `when i find myself in times of trouble +let str = `when i find myself in times of trouble mother mary comes to me speaking words of wisdom, let it be and in my hour of darkness @@ -35,4 +35,24 @@ oh, there will be an answer, let it be let it be, let it be let it be, yeah, let it be whisper words of wisdom, let it be`; + +let newchar=' '; +str = str.split(',').join(newchar); +str = str.split('\n').join(newchar); +let arr = str.split(" "); + +let set = new Set(); +for(let i=0;i{ + answer+=element + if(idx!=set.length-1) + answer+=" "; +}) +console.log(answer) +return answer } \ No newline at end of file diff --git a/Match 03/submissions/base.js b/Match 03/submissions/base.js index 84f37a6..c3db737 100644 --- a/Match 03/submissions/base.js +++ b/Match 03/submissions/base.js @@ -8,4 +8,4 @@ function solution(a, b) { let arr1=[...a].join(""); let arr2=[...b].join(""); return !arr1.localeCompare(arr2) -} \ No newline at end of file +} \ No newline at end of file From b1906bbbb28a6c4a53ed4c323965a7d841588394 Mon Sep 17 00:00:00 2001 From: Nikhil Date: Wed, 16 Feb 2022 11:58:12 +0530 Subject: [PATCH 5/9] created min.js in match2 and match3 --- Match 01/submissions/base.js | 2 +- Match 02/submissions/base.js | 95 +++++++++------------- Match 02/submissions/nikhil.chandna.min.js | 44 ++++++++++ Match 03/submissions/base.js | 9 +- Match 03/submissions/nikhil.chandna.min.js | 11 +++ 5 files changed, 95 insertions(+), 66 deletions(-) create mode 100644 Match 02/submissions/nikhil.chandna.min.js create mode 100644 Match 03/submissions/nikhil.chandna.min.js diff --git a/Match 01/submissions/base.js b/Match 01/submissions/base.js index c0df2c6..2f3a980 100644 --- a/Match 01/submissions/base.js +++ b/Match 01/submissions/base.js @@ -1,3 +1,3 @@ function solution(n) { return ""; -} \ No newline at end of file +} \ No newline at end of file diff --git a/Match 02/submissions/base.js b/Match 02/submissions/base.js index af25d87..84bc4ca 100644 --- a/Match 02/submissions/base.js +++ b/Match 02/submissions/base.js @@ -1,58 +1,39 @@ -function solution() { -let str = `when i find myself in times of trouble -mother mary comes to me -speaking words of wisdom, let it be -and in my hour of darkness -she is standing right in front of me -speaking words of wisdom, let it be -let it be, let it be -let it be, let it be -whisper words of wisdom, let it be -and when the broken-hearted people -living in the world agree -there will be an answer, let it be -for though they may be parted -there is still a chance that they will see -there will be an answer, let it be -let it be, let it be -let it be, let it be -yeah, there will be an answer, let it be -let it be, let it be -let it be, let it be -whisper words of wisdom, let it be -let it be, let it be -ah, let it be, yeah, let it be -whisper words of wisdom, let it be -and when the night is cloudy -there is still a light that shines on me -shine on until tomorrow, let it be -i wake up to the sound of music, -mother mary comes to me -speaking words of wisdom, let it be -let it be, let it be -let it be, yeah, let it be -oh, there will be an answer, let it be -let it be, let it be -let it be, yeah, let it be -whisper words of wisdom, let it be`; - -let newchar=' '; -str = str.split(',').join(newchar); -str = str.split('\n').join(newchar); -let arr = str.split(" "); - -let set = new Set(); -for(let i=0;i{ - answer+=element - if(idx!=set.length-1) - answer+=" "; -}) -console.log(answer) -return answer +function solution(){ + return `when i find myself in times of trouble + mother mary comes to me + speaking words of wisdom, let it be + and in my hour of darkness + she is standing right in front of me + speaking words of wisdom, let it be + let it be, let it be + let it be, let it be + whisper words of wisdom, let it be + and when the broken-hearted people + living in the world agree + there will be an answer, let it be + for though they may be parted + there is still a chance that they will see + there will be an answer, let it be + let it be, let it be + let it be, let it be + yeah, there will be an answer, let it be + let it be, let it be + let it be, let it be + whisper words of wisdom, let it be + let it be, let it be + ah, let it be, yeah, let it be + whisper words of wisdom, let it be + and when the night is cloudy + there is still a light that shines on me + shine on until tomorrow, let it be + i wake up to the sound of music, + mother mary comes to me + speaking words of wisdom, let it be + let it be, let it be + let it be, yeah, let it be + oh, there will be an answer, let it be + let it be, let it be + let it be, yeah, let it be + whisper words of wisdom, let it be`; + } \ No newline at end of file diff --git a/Match 02/submissions/nikhil.chandna.min.js b/Match 02/submissions/nikhil.chandna.min.js new file mode 100644 index 0000000..c1cc745 --- /dev/null +++ b/Match 02/submissions/nikhil.chandna.min.js @@ -0,0 +1,44 @@ +function solution() { + var a = "let it be"; + var b = "words of wisdom"; + var c = "whisper"; + var d = "there will be an answer"; + var e = "speaking" + return `when i find myself in times of trouble + mother mary comes to me + {$e} {$b}, {$a} + and in my hour of darknessss + she is standing right in front of me + {$e} {$b}, {$a} + {$a}, {$a} + {$a}, {$a} + {$c} {$b}, {$a} + and when the broken-hearted people + living in the world agree + {$d}, {$a} + for though they may be parted + there is still a chance that they will see + {$d}, {$a} + {$a}, {$a} + {$a}, {$a} + yeah, {$d}, {$a} + {$a}, {$a} + {$a}, {$a} + {$c} {$b}, {$a} + {$a}, {$a} + ah, {$a}, yeah, {$a} + {$c} {$b}, {$a} + and when the night is cloudy + there is still a light that shines on me + shine on until tomorrow, {$a} + i wake up to the sound of music, + mother mary comes to me + {$e} {$b}, {$a} + {$a}, {$a} + {$a}, yeah, {$a} + oh, {$d}, {$a} + {$a}, {$a} + {$a}, yeah, {$a} + {$c} {$b}, {$a}`; + } + diff --git a/Match 03/submissions/base.js b/Match 03/submissions/base.js index c3db737..407288f 100644 --- a/Match 03/submissions/base.js +++ b/Match 03/submissions/base.js @@ -1,11 +1,4 @@ function solution(a, b) { - const specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/; - let bool1 = specialChars.test(a); - let bool2 = specialChars.test(b); - if(bool1 || bool2) - return false; - let arr1=[...a].join(""); - let arr2=[...b].join(""); - return !arr1.localeCompare(arr2) + return false } \ No newline at end of file diff --git a/Match 03/submissions/nikhil.chandna.min.js b/Match 03/submissions/nikhil.chandna.min.js new file mode 100644 index 0000000..7787633 --- /dev/null +++ b/Match 03/submissions/nikhil.chandna.min.js @@ -0,0 +1,11 @@ +function solution(a, b) { + + const specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/; + let bool1 = specialChars.test(a); + let bool2 = specialChars.test(b); + if(bool1 || bool2) + return false; + let arr1=[...a].join(""); + let arr2=[...b].join(""); + return !arr1.localeCompare(arr2) + } \ No newline at end of file From 4e9f2cd6d578efc96e4096be49b65e5ac81e2802 Mon Sep 17 00:00:00 2001 From: nikhilZopS Date: Wed, 16 Feb 2022 12:18:08 +0530 Subject: [PATCH 6/9] base file edited --- Match 03/submissions/base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Match 03/submissions/base.js b/Match 03/submissions/base.js index 407288f..aba9e24 100644 --- a/Match 03/submissions/base.js +++ b/Match 03/submissions/base.js @@ -1,4 +1,4 @@ function solution(a, b) { - return false + return false; } \ No newline at end of file From 486b2f73b810129f754bab86a3ff0124e04f3585 Mon Sep 17 00:00:00 2001 From: nikhilZopS Date: Thu, 17 Feb 2022 10:48:05 +0530 Subject: [PATCH 7/9] checking for sshset url --- tempFile.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tempFile.js diff --git a/tempFile.js b/tempFile.js new file mode 100644 index 0000000..e69de29 From 76f109afed2c4a87f4fd50e16851786931a6563c Mon Sep 17 00:00:00 2001 From: nikhilZopS Date: Fri, 25 Feb 2022 12:56:54 +0530 Subject: [PATCH 8/9] check git-push --- Match 02/submissions/nikhil.chandna.min.js | 5 ++--- Match 03/submissions/nikhil.chandna.min.js | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Match 02/submissions/nikhil.chandna.min.js b/Match 02/submissions/nikhil.chandna.min.js index c1cc745..2776ef1 100644 --- a/Match 02/submissions/nikhil.chandna.min.js +++ b/Match 02/submissions/nikhil.chandna.min.js @@ -4,9 +4,8 @@ function solution() { var c = "whisper"; var d = "there will be an answer"; var e = "speaking" - return `when i find myself in times of trouble - mother mary comes to me - {$e} {$b}, {$a} + return `when i find myself in times of trouble mother mary comes to me + {$e} {$b},{$a} and in my hour of darknessss she is standing right in front of me {$e} {$b}, {$a} diff --git a/Match 03/submissions/nikhil.chandna.min.js b/Match 03/submissions/nikhil.chandna.min.js index 7787633..7234d37 100644 --- a/Match 03/submissions/nikhil.chandna.min.js +++ b/Match 03/submissions/nikhil.chandna.min.js @@ -3,8 +3,7 @@ function solution(a, b) { const specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/; let bool1 = specialChars.test(a); let bool2 = specialChars.test(b); - if(bool1 || bool2) - return false; + if(bool1 || bool2) return false; let arr1=[...a].join(""); let arr2=[...b].join(""); return !arr1.localeCompare(arr2) From 0782dbef91b68ebb751af7126a5d874b5ed5df7e Mon Sep 17 00:00:00 2001 From: nikhilZopS Date: Fri, 25 Feb 2022 13:19:30 +0530 Subject: [PATCH 9/9] remove whitespace --- Match 02/submissions/base.js | 40 +--------------------- Match 02/submissions/nikhil.chandna.min.js | 2 +- Match 03/submissions/nikhil.chandna.min.js | 11 +----- 3 files changed, 3 insertions(+), 50 deletions(-) diff --git a/Match 02/submissions/base.js b/Match 02/submissions/base.js index 84bc4ca..75d0a6d 100644 --- a/Match 02/submissions/base.js +++ b/Match 02/submissions/base.js @@ -1,39 +1 @@ -function solution(){ - return `when i find myself in times of trouble - mother mary comes to me - speaking words of wisdom, let it be - and in my hour of darkness - she is standing right in front of me - speaking words of wisdom, let it be - let it be, let it be - let it be, let it be - whisper words of wisdom, let it be - and when the broken-hearted people - living in the world agree - there will be an answer, let it be - for though they may be parted - there is still a chance that they will see - there will be an answer, let it be - let it be, let it be - let it be, let it be - yeah, there will be an answer, let it be - let it be, let it be - let it be, let it be - whisper words of wisdom, let it be - let it be, let it be - ah, let it be, yeah, let it be - whisper words of wisdom, let it be - and when the night is cloudy - there is still a light that shines on me - shine on until tomorrow, let it be - i wake up to the sound of music, - mother mary comes to me - speaking words of wisdom, let it be - let it be, let it be - let it be, yeah, let it be - oh, there will be an answer, let it be - let it be, let it be - let it be, yeah, let it be - whisper words of wisdom, let it be`; - -} \ No newline at end of file +function solution(){return `when i find myself in times of trouble mother mary comes to me speaking words of wisdom, let it be and in my hour of darkness she is standing right in front of me speaking words of wisdom, let it be let it be, let it be let it be, let it be whisper words of wisdom, let it be and when the broken-hearted people living in the world agree there will be an answer, let it be for though they may be parted there is still a chance that they will see there will be an answer, let it be let it be, let it be let it be, let it be yeah, there will be an answer, let it be let it be, let it be let it be, let it be whisper words of wisdom, let it be let it be, let it be ah, let it be, yeah, let it be whisper words of wisdom, let it be and when the night is cloudy there is still a light that shines on me shine on until tomorrow, let it be i wake up to the sound of music,mother mary comes to me speaking words of wisdom, let it be let it be, let it be let it be, yeah, let it be oh, there will be an answer, let it be let it be, let it be let it be, yeah, let it be whisper words of wisdom, let it be`;} \ No newline at end of file diff --git a/Match 02/submissions/nikhil.chandna.min.js b/Match 02/submissions/nikhil.chandna.min.js index 2776ef1..b5e1c8e 100644 --- a/Match 02/submissions/nikhil.chandna.min.js +++ b/Match 02/submissions/nikhil.chandna.min.js @@ -5,7 +5,7 @@ function solution() { var d = "there will be an answer"; var e = "speaking" return `when i find myself in times of trouble mother mary comes to me - {$e} {$b},{$a} +{$e} {$b},{$a} and in my hour of darknessss she is standing right in front of me {$e} {$b}, {$a} diff --git a/Match 03/submissions/nikhil.chandna.min.js b/Match 03/submissions/nikhil.chandna.min.js index 7234d37..94781e6 100644 --- a/Match 03/submissions/nikhil.chandna.min.js +++ b/Match 03/submissions/nikhil.chandna.min.js @@ -1,10 +1 @@ -function solution(a, b) { - - const specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/; - let bool1 = specialChars.test(a); - let bool2 = specialChars.test(b); - if(bool1 || bool2) return false; - let arr1=[...a].join(""); - let arr2=[...b].join(""); - return !arr1.localeCompare(arr2) - } \ No newline at end of file +function solution(a, b) {const specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/;let bool1=specialChars.test(a);let bool2=specialChars.test(b);if(bool1||bool2) return false;let arr1=[...a].join("");let arr2=[...b].join("");return !arr1.localeCompare(arr2)} \ No newline at end of file