Sort and Tag
The goal is to sort these lines alphabetically, assign a unique identifier to each line in the format "[01]", "[02]", etc., and then restore the original order of the lines while preserving the assigned identifiers.
Start file
Charmander
____________________
Sprigatito
____________________
Meowscarada
____________________
Pikachu
____________________
Feraligatr
____________________
Hydreigon
____________________
Lucario
____________________
Blaziken
____________________
Dragonite
____________________
Garchomp
____________________
Pidgeot
____________________
Squirtle
____________________
Gardevoir
____________________
Alakazam
____________________
End file
[03] Charmander
____________________
[13] Sprigatito
____________________
[10] Meowscarada
____________________
[12] Pikachu
____________________
[05] Feraligatr
____________________
[08] Hydreigon
____________________
[09] Lucario
____________________
[02] Blaziken
____________________
[04] Dragonite
____________________
[06] Garchomp
____________________
[11] Pidgeot
____________________
[14] Squirtle
____________________
[07] Gardevoir
____________________
[01] Alakazam
____________________
View Diff
1c1
< Charmander
---
> [03] Charmander
3c3
< Sprigatito
---
> [13] Sprigatito
5c5
< Meowscarada
---
> [10] Meowscarada
7c7
< Pikachu
---
> [12] Pikachu
9c9
< Feraligatr
---
> [05] Feraligatr
11c11
< Hydreigon
---
> [08] Hydreigon
13c13
< Lucario
---
> [09] Lucario
15c15
< Blaziken
---
> [02] Blaziken
17c17
< Dragonite
---
> [04] Dragonite
19c19
< Garchomp
---
> [06] Garchomp
21c21
< Pidgeot
---
> [11] Pidgeot
23c23
< Squirtle
---
> [14] Squirtle
25c25
< Gardevoir
---
> [07] Gardevoir
27c27
< Alakazam
---
> [01] Alakazam
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock 60 remaining solutions by signing in and submitting your own entry
#61 xjerrod / @xjerrod - Score: 452 - 01/30/25 @ 00:50
:set rnu<CR>26jd2$ggP16jd2$14kP16jd2$12kP8jd2$6kP12jd2$10kP16jd2$13kP8k16jd2$6kP8jd2$6kP4m<BS>jjjjd2$2kP6k12jd2$3kkP4k8jd2$kkP3j1js2$<BS><BS>S<Esc>d2$kPuuggi[] <Left><Left>0<Esc>jjh..uuip<BS>[0[<BS><BS><BS>[0] <Esc>jjhhhpu.uu[0i[0] <Esc>jjhhh.ou<BS><Esc>ud<BS>u2j0.u2j1j2k0i[0] <Esc>2j0.2j0.2j0.2j0.2j0.2j0.2j0.2j0.2j0.2j0.hggkkkll1i1J<BS><NL><Esc>ui1<Esc>jji2<Esc>jji3<Esc>jji3<BS>4i<BS><Esc>jji5<Down><Down><Left>6<Down><Down><Left>7<Down><Down><Left>8<Down><Left><Down>9<Down><Down><Left><BS>10<Down><Left><Down><Left><Right><BS>11<Down><Left><Down><Left><Right><BS>12<Down><Left><Down><BS>13<Down><Left><Down><BS>15<BS>4<Esc>ggd2$Gpggd2$jjP20jd2$<Esc>21kp16jd2$15kp18k22jd2$16kP6jd2$5kp10jd2$9kp10jd2$9kp10jd2$3kppu4jd2$3kp:wq<CR>
0 comments