Loops allow us to take a series of commands and keep re-running them until a particular situation is reached. They are useful for automating repetitive tasks.
for i in {5..10};
do
echo $i;
done
i=1while [ $i -le 20 ]doecho "$i"i=$(($i+1))done
| Problem | Score | Companies | Time | Status |
|---|---|---|---|---|
| Valid phone number | 150 |
|
22:40 | |
| Lines in a given range | 200 |
|
27:20 | |
| Remove Punctuations | 250 |
|
13:07 | |
| Transform CSV | 300 |
|
19:00 |