Skip to content

Instantly share code, notes, and snippets.

// https://www.hackerrank.com/challenges/missing-numbers/problem
// this solution posted as comment on, to explain how O(n) solution is designed:
// = https://www.youtube.com/watch?v=N6r9Dh68Y3o
vector<int> missingNumbers(vector<int> arr, vector<int> brr) {
auto const base = brr.front();
int freqs[100] {0};
int actual_base = base;
for(auto const item : brr) {
@snawaz
snawaz / app_one.js
Created March 16, 2019 05:55
Jaeger headers forwarding with Isito does not work
'use strict';
const express = require('express');
// Constants
const PORT = 8080;
const HOST = '0.0.0.0';
// App
const app = express();
// Start the application
tokio::run(lazy(|| {
let addr = "127.0.0.1:0".parse().unwrap();
let listener = TcpListener::bind(&addr).unwrap();
// Create the channel that is used to communicate with the
// background task.
let (tx, rx) = mpsc::channel(1_024);
// Spawn the background task: