Instantly share code, notes, and snippets.

🎯
Focusing

🎯
Focusing
• Sort options
Created Aug 17, 2019
Checking for a palindrome using Javascript
View palidnrome-checker.js
 function palindromeCheck(){ let word = prompt("Write a word:") let collection = [] //adding letters from word to collection for(let i = 0; i < word.length; i++ ){ collection.push(word[i]); } this.front = function(){ return collection
Created Aug 17, 2019
A simplest method to solve Hackerrank stairCase problem.
View stair-case.js
 function stairCase(n){ let arr = Array(n-1).fill(' ') for (let i = n-1; i >= 0; i--) { arr[i] = '#'; console.log(arr.join('')); } } stairCase(6)
Created Aug 17, 2019
Solution for HackerRank > Algorithms > Warmup > Diagonal difference
View diagonal-difference.js
 function diagonalDifference(arr) { let left_diagonal = 0 let right_diagonal = 0 let total = 0 for (let i = 0; i < arr.length; i++){ left_diagonal += arr[i][i] right_diagonal += arr[arr.length - 1 - i][i]
Last active Aug 16, 2019
Solution for HackerRank > Algorithms > Warmup > Compare the Triplets. Visit https://www.hackerrank.com/challenges/compare-the-triplets/problem?h_r=next-challenge&h_v=zen
View compare-the-triplets.js
 /* This is the easiest method Hope it helps */ function compareTriplets(a, b) { let aliceScore = 0 let bobScore = 0 let result = [0, 0] for (let i = 0; i
Created May 1, 2019
Crash report in android 8.1 and 9
View stack trace.java
 android.app.RemoteServiceException: at android.app.ActivityThread\$H.handleMessage (ActivityThread.java:1871) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:214) at android.app.ActivityThread.main (ActivityThread.java:7032) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.RuntimeInit\$MethodAndArgsCaller.run (RuntimeInit.java:494) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)
Last active Apr 27, 2019