Pinned Loading
-
In an array of ints, return the inde...
In an array of ints, return the index such that the sum of the elements to the right of that index equals the sum of the elements to the left of that index 1function peak(arr) {
2let leftsum = 0;
3let rightsum = 0;
4mid = Math.floor(arr.length / 2)
5const hash = {}
-
A function that accepts a 2D array r...
A function that accepts a 2D array representing a Sudoku board, and returns true if it is a valid solution, or false otherwise. The cells of the sudoku board may also contain 0's, which will represent empty cells. Boards containing one or more zeroes are considered to be invalid solutions. 1function validSolution(board) {
2let valid = true;
3const testvaliditiy = (arr) => {
4let set = new Set(arr);
5if (arr.includes(0) || [...set].length !== 9) {
-
Priority Queue implementation in Jav...
Priority Queue implementation in Javascript 1/**
2* A priority queue stores a list of items but each can have a numeric priority value.
3* Items with a higher priority are dequeued before items with a lower priority.
4* Implemented as a hash of arrays where the hash keys are priority values.
5*/
-
Using async/await in javascript, tra...
Using async/await in javascript, transforming promise to chain to async/await 1function callApi(url){
2return new Promise((resolve,reject) => {
3console.log(`calling API: ${url}`)
4if(url==='twitter'|| url=='facebook'){
5resolve(`connected to ${url}`)
72 contributions in the last year
Day of Week | February Feb | March Mar | April Apr | May May | June Jun | July Jul | August Aug | September Sep | October Oct | November Nov | December Dec | January Jan | February Feb | ||||||||||||||||||||||||||||||||||||||||
Sunday Sun | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Monday Mon | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Tuesday Tue | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Wednesday Wed | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Thursday Thu | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Friday Fri | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Saturday Sat |
Less
No contributions.
Low contributions.
Medium-low contributions.
Medium-high contributions.
High contributions.
More
Activity overview
Contributed to
matharoo/bitcoin-exporter,
browser-use/web-ui
Loading
Contribution activity
February 2025
2
contributions
in private repositories
Feb 6