Instantly share code, notes, and snippets.

# J Rjrusev

• Sort options
Last active Jan 19, 2016
Useful commands for working with Clojure in Emacs
View emacs-cmds.md
Last active Nov 16, 2016
View coding_problems.md

tests

### Problem 1. Ransom Note

A kidnapper wishes to write a ransom note using letters from a magazine. Given the ransom note and the magazine, find if the kidnapper can write the note by cutting letters out of the magazine.

### Problem 2. Brackets

Last active Jan 24, 2018
View coding_problems_tests.md

problems

### Problem 1. Ransom note

``````'one sentence from a magazine', 'ransom note' => True
'one payment', 'pay money' => False
'downpayment', 'pay now' => True
``````
Last active Sep 12, 2016
View no_problem.md

Input: Integer greater than 0 and less than 4000.

Output: Integer greater than 0.

Examples:

Input Output
583 53222000
888 544432221000
Last active Feb 17, 2017
View parse.py
 def parse(s): """Parse a JSON string containing only integers and arrays.""" return int(s) if s[0].isdigit() else parse_array(s, 1)[0] def parse_array(s, i): """Return the array beginning at index i and the end index of the array.""" res = [] while s[i] != ']': if s[i].isdigit(): start = i
Created Apr 8, 2017
View workers.go
 package main import "fmt" import "time" func f(in <-chan int, out chan<- int) { for j := range in { time.Sleep(time.Second) out <- j * 2 }
Last active Aug 16, 2017
View pm_interview.md

# The Product Manager Interview

## Measure

• product sense (discuss products, design, creativity, thinking from first principles)
• execution/collaboration/metrics
• analytical skills
• technical depth

## Questions

Last active Feb 16, 2018
View server.js
 var http = require('http'); var port = 1234; http.createServer(function (req, resp) { var body = []; req.on('data', function (chunk) { body.push(chunk); }); req.on('end', function () { body = Buffer.concat(body).toString(); console.log({headers: req.headers, method: req.method, body: body}); resp.writeHead(200, {'Content-Type': 'text/plain'}); resp.end('OK');
You can’t perform that action at this time.