This file contains 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
-- main = print (mergeSortedList ([1,4,6,7],[0,2,5,9])) | |
-- some more sample inputs | |
-- main = print (mergeSortedList ([1,4,6,7],[])) | |
-- main = print (mergeSortedList ([],[0,2,5,9])) | |
mergeSortedList :: ([Int],[Int])->[Int] | |
mergeSortedList ([],ys) = ys | |
mergeSortedList (xs,[]) = xs | |
mergeSortedList ((x:xs),(y:ys)) |
This file contains 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
/** | |
* Steps To Run | |
* 1. Install NodeJS | |
* 2. Dowload Gist | |
* 3. Run from terminal node clockProblem.js | |
*/ | |
const CLOCK_MAX = 12; | |
const CLOCK_HALF = 6; | |
const add = (x, y) => x + y; |
This file contains 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
import React from 'react'; | |
import AutoComplete from 'react-autocomplete' | |
const AutoCompleteWrapper = ({ selectedItem, items, onChange }) => ( | |
<AutoComplete | |
getItemValue={(item) => selectedItem.label} | |
items={items} | |
renderItem={(item, isHighlighted) => <div key={item.label}>{item.label}</div>} | |
value={selectedItem.label} | |
onChange={(event, value) => onChange({ key: '', label: value })} |