generated from mwc/lab_pipes
started question set
This commit is contained in:
16
exercises.md
16
exercises.md
@@ -11,27 +11,43 @@ If you want to be really stylish, put your code inside of backticks like this:
|
|||||||
|
|
||||||
## 1. What is the longest word?
|
## 1. What is the longest word?
|
||||||
|
|
||||||
|
antidisestablishmentarianism
|
||||||
|
`cat words_100k.txt | length | order`
|
||||||
|
|
||||||
|
|
||||||
## 2. How many words have two u's in a row?
|
## 2. How many words have two u's in a row?
|
||||||
|
|
||||||
|
16
|
||||||
|
` cat words_100k.txt | match "uu" | count`
|
||||||
|
|
||||||
## 3. How many words have the word "cat" in them?
|
## 3. How many words have the word "cat" in them?
|
||||||
|
|
||||||
|
893
|
||||||
|
`cat words_100k.txt | match "cat" | count`
|
||||||
|
|
||||||
## 4. How many words have all five vowels (aeiou)?
|
## 4. How many words have all five vowels (aeiou)?
|
||||||
|
|
||||||
|
812
|
||||||
|
`cat words_100k.txt | match "a" | match "e" | match "i" | match "o" | match "u"| count`
|
||||||
|
|
||||||
|
|
||||||
## 5. Which words have two l's in a row, two m's in a row, and two t's in a row? (they don't have to be in that order)
|
## 5. Which words have two l's in a row, two m's in a row, and two t's in a row? (they don't have to be in that order)
|
||||||
|
|
||||||
|
0
|
||||||
|
`cat words_100k.txt | match "tt" | match "ll" | match "mm"`
|
||||||
|
|
||||||
## 6. How many words have sixteen or more letters?
|
## 6. How many words have sixteen or more letters?
|
||||||
|
|
||||||
|
|
||||||
## 7. What's the most frequent 10-letter word?
|
## 7. What's the most frequent 10-letter word?
|
||||||
|
|
||||||
|
zoomorphic (but its a tie?)
|
||||||
|
`cat words_100k.txt | length | match "10" | frequency | order`
|
||||||
|
|
||||||
## 8. What's the longest word which doesn't have any repeated letters?
|
## 8. What's the longest word which doesn't have any repeated letters?
|
||||||
|
|
||||||
|
13 salpingectomy
|
||||||
|
`cat words_100k.txt | length | unique 1 | length | equal 0 2 | order`
|
||||||
|
|
||||||
## 9. What's the longest word which only uses four different letters?
|
## 9. What's the longest word which only uses four different letters?
|
||||||
|
|
||||||
|
|||||||
100000
words_100k.txt
Normal file
100000
words_100k.txt
Normal file
File diff suppressed because it is too large
Load Diff
10000
words_10k.txt
Normal file
10000
words_10k.txt
Normal file
File diff suppressed because it is too large
Load Diff
1000
words_1k.txt
Normal file
1000
words_1k.txt
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user