This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function changeValue(arr) { | |
| return function fromIndex(arrIndex) { | |
| return function withValue(newValue) { | |
| return arr.map(function(arr, index){ | |
| if (index == arrIndex) { | |
| return newValue | |
| } | |
| return arr | |
| }) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Person(saying) { | |
| this.saying = saying | |
| } | |
| Person.prototype.talk = function() { | |
| console.log('I say:', this.saying); | |
| } | |
| // replicate what `new` does | |
| function spawn(constructor) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| postgres: | |
| image: postgres:9.4 | |
| volumes: | |
| - ./init.sql:/docker-entrypoint-initdb.d/init.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Enter your code here. Read input from STDIN. Print output to STDOUT | |
| import sys | |
| def solution(baseWord, words): | |
| counter = 0 | |
| for word in words.split(): | |
| if set(baseWord).issubset(set(word)): | |
| counter += 1 | |
| return counter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "workbench.startupEditor": "newUntitledFile", | |
| "window.zoomLevel": 0, | |
| "editor.fontSize": 15, | |
| "workbench.colorTheme": "Solarized Dark", | |
| "workbench.iconTheme": "Monokai Pro (Filter Octagon) Icons", | |
| "files.autoSave": "afterDelay", | |
| "todo-tree.tree.showScanModeButton": false, | |
| "editor.minimap.enabled": false, | |
| "explorer.confirmDragAndDrop": false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "theme": "dark", | |
| "autoUpdate": false, | |
| "snippet": { | |
| "expanded": true, | |
| "newSnippetPrivate": false, | |
| "sorting": "updated_at", | |
| "sortingReverse": true | |
| }, | |
| "editor" : { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/python3 | |
| import math | |
| import os | |
| import random | |
| import re | |
| import sys | |
| def isPair(open, close): | |
| if open == "(" and close == ")": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # every open API needs this | |
| swagger: '2.0' | |
| # document metadata | |
| info: | |
| version: "0.3.0" | |
| title: Music API | |
| # URL data | |
| host: api.muzicplayz.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Task description | |
| A small frog wants to get to the other side of the road. The frog is currently located at position X and wants to get to a position greater than or equal to Y. The small frog always jumps a fixed distance, D. | |
| Count the minimal number of jumps that the small frog must perform to reach its target. | |
| Write a function: | |
| def solution(X, Y, D) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| Task description | |
| An array A consisting of N different integers is given. The array contains integers in the range [1..(N + 1)], which means that exactly one element is missing. | |
| Your goal is to find that missing element. | |
| Write a function: | |
| def solution(A) |