Skip to content

Instantly share code, notes, and snippets.

View d-beloved's full-sized avatar
🏠
Working from home

Ayodeji Moronkeji d-beloved

🏠
Working from home
View GitHub Profile

An array of integers is defined as being in meandering order when the first two elements are the respective largest and smallest elements in the array and the subsequent elements alternate between its next largest and next smallest elements. In other words, the elements are in order of [first_largest, first_smallest, second_largest, second_smallest, ...].

Example

The array [5, 2, 7, 8, -2, 25, 25] sorted normally is [-2, 2, 5, 7, 8, 25, 25]. Sorted in meandering order, it becomes [25, -2, 25, 2, 8, 5, 7]

Function Description

The function takes one parameter, unsorted[n]: the unsorted array

@d-beloved
d-beloved / numSumAlgo.js
Last active April 10, 2020 21:39
Two Number Sum algorithm (Solution using two methods)
// Two Number sum algorithm challenge
// Solution using the algebraic method
const twoNumberSum = (array, targetSum) => {
const hashTable = {}
for (let value of array) {
let yValue = targetSum - value;
if (hashTable[yValue]) {
return [yValue, value]
}
else {
@rosswd
rosswd / multi-git-win.md
Last active February 28, 2024 09:46
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

Setting up github and bitbucket on the same computer (Windows)

Guide for Windows

mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.

Github will be the main account and bitbucket the secondary.

Git for Windows

  • Download and install Git for Windows
    • In the installer, select everything but decide if you want a desktop icon (2nd step)
@rxaviers
rxaviers / gist:7360908
Last active April 26, 2024 15:35
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: