Skip to content

Instantly share code, notes, and snippets.

View myquery's full-sized avatar
🎯
Currently developing, with a team, NPF https://policerecruitment.gov,ng

Ibe Arua myquery

🎯
Currently developing, with a team, NPF https://policerecruitment.gov,ng
View GitHub Profile
@myquery
myquery / binaryTree-max-depth.js
Created April 21, 2022 08:57 — forked from primaryobjects/binaryTree-max-depth.js
Finding the maximum depth of a binary tree in JavaScript.
/**
* Definition for a binary tree node.
* function TreeNode(val) {
* this.val = val;
* this.left = this.right = null;
* }
*/
/**
* @param {TreeNode} root
* @return {number}
@myquery
myquery / sendgrid.js
Created February 15, 2022 16:59 — forked from Pompeu/sendgrid.js
try mock sendgrid
'use strict';
const sendgrid = require('sendgrid')(process.env.MAIL_KEY || 'may secrete key');
function Mailer () {
this.sendMail = body => {
if(!this.verifyMailbody(body)) {
throw new TypeError('invalid body');
}
@myquery
myquery / gist:4cb0757d70ae667ea0fba357866f8baa
Created November 23, 2019 11:16
Creating Multidimensional array
let arr = new Array(4); for(let i = 0; i < 4; i++){ arr[i] = new Array(4); for(let j = 0; j < 4; j++){arr[i][j] = ‘[‘ + i + ‘,’ + j +’]’;}}