Skip to content

Instantly share code, notes, and snippets.

View owans's full-sized avatar
🏠
Working from home

Owanate Amachree owans

🏠
Working from home
View GitHub Profile
@owans
owans / tomorrow.js
Last active April 17, 2019 17:27
API for tomorrow's weather
const ora = require('ora');
const getWeather = require('../utils/weatherforecast');
const getLocation = require('../utils/location');
module.exports = async (args) => {
const spinner = ora().start();
try{
const location = args.location || args.l ||await getLocation();
@owans
owans / HashTable.md
Last active April 8, 2019 18:53
Find duplicate nos in array using hash tables

//hash tables are used to iterate over an array using a key to compute the array index, instead of using the key as an array index

//for this function i is used as a key to loop through the array

const showDuplicateNo = (array) => { let hashTable = []; let duplicateNo = [];

for (let i = 0; i < array.length; i++) {

@owans
owans / owansLogistics.md
Last active April 2, 2019 21:35
LevelUp Coding Challenge: Design a database for a Logistics Company

Identify Entities

a. Warehousing

b. Shipping

c. Inventory

d. Security