sort by first occurrence

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Sort a list of lines, such that lines which occur for the first time earlier in the input sort earlier than lines which occur for the first time later in the input.

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

q
w
e
r
e
e
w
r
q

Sample output:

q
q
w
w
e
e
e
r
r

Sample input:_

Forth
LMNtal
vi
sed
Curry
Brainfuck
Io
Logo
LMNtal
gas
Whirl
Perl6
COBOL
Arc
Go
C
QCL
FlogScript
Tcl
Zsh
Go
Java
Pefunge
Scala
ObjC
Arc
Scheme
Unlambda
vi
DOS
Go
VHDL
Grass
Groovy
QCL
Zsh
LilyPond
Ada
Postscript
wake
LilyPond
Ada
Perl
Pefunge
Common LISP
Cyan
wake
D-compile-time
DOS
Whirl
Pascal
VHDL
BASIC
Haskell
D-compile-time
Ruby
x86
D
Forth
J
GolfScript
LilyPond
Smalltalk
Mind
FerNANDo
x86
Minus
Arc
Perl
Smalltalk
Common LISP
Pascal
Perl6
m4
Smalltalk
Forth
dc
Zsh
Pefunge
Brainfuck
C#
Cyan
C++
Java
Maxima
Clojure
Postscript
Python
R
Ruby
Go
sed
m4
bc
DOS
Arc
Whirl
Tcl
Zsh
GolfScript

Sample output:

Forth
Forth
Forth
LMNtal
LMNtal
vi
vi
sed
sed
Curry
Brainfuck
Brainfuck
Io
Logo
gas
Whirl
Whirl
Whirl
Perl6
Perl6
COBOL
Arc
Arc
Arc
Arc
Go
Go
Go
Go
C
QCL
QCL
FlogScript
Tcl
Tcl
Zsh
Zsh
Zsh
Zsh
Java
Java
Pefunge
Pefunge
Pefunge
Scala
ObjC
Scheme
Unlambda
DOS
DOS
DOS
VHDL
VHDL
Grass
Groovy
LilyPond
LilyPond
LilyPond
Ada
Ada
Postscript
Postscript
wake
wake
Perl
Perl
Common LISP
Common LISP
Cyan
Cyan
D-compile-time
D-compile-time
Pascal
Pascal
BASIC
Haskell
Ruby
Ruby
x86
x86
D
J
GolfScript
GolfScript
Smalltalk
Smalltalk
Smalltalk
Mind
FerNANDo
Minus
m4
m4
dc
C#
C++
Maxima
Clojure
Python
R
bc

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid270.04162011/10/27 03:46:090B / 9B / 17B
2yvl270.03722011/10/27 15:25:590B / 9B / 17B
3clock320.04032011/10/25 22:11:190B / 13B / 18B
4eban330.03802011/11/03 15:20:010B / 14B / 19B

Perl _

RankUserSizeTimeDateStatistics
1tails260.02762011/10/26 20:32:000B / 11B / 13B
2teebee300.02882011/10/26 06:23:460B / 11B / 18B
3yibe310.03532011/11/08 04:39:070B / 16B / 15B
4ais523450.02912011/10/27 02:45:100B / ?B / ?B

Python _

RankUserSizeTimeDateStatistics
1leonid610.04382011/10/27 07:53:190B / 40B / 20B
2hallvabo610.15652011/10/27 09:44:270B / 37B / 23B
3twobit610.07002011/10/28 08:50:470B / 40B / 20B
4recursive610.04532011/11/01 05:13:190B / 40B / 20B
5Hendrik610.04472011/11/05 00:39:570B / 40B / 20B
6niisaka760.06492011/11/04 19:15:420B / 51B / 22B

PHP _

RankUserSizeTimeDateStatistics
1clock460.07202011/10/26 10:45:230B / 21B / 25B
2teebee460.07612011/10/26 17:40:260B / 21B / 25B
3Korvin750.06142011/10/26 07:04:492B / ?B / ?B

Scheme _

RankUserSizeTimeDateStatistics
1kaki920.07802011/10/26 02:47:520B / 69B / 18B

Common LISP _

RankUserSizeTimeDateStatistics
1kurohuku1050.04872011/11/04 13:37:391B / ?B / ?B

Io _

RankUserSizeTimeDateStatistics
1pooq780.18942011/10/29 13:35:030B / 65B / 5B
2teebee(pooq)750.16852013/07/07 11:13:130B / 60B / 10B

JavaScript _

RankUserSizeTimeDateStatistics
10mg640.03862011/10/27 12:23:380B / 35B / 27B
2nn670.04162011/10/25 22:55:560B / 35B / 29B
3clock690.04182011/11/04 02:37:510B / 36B / 31B
4xulapp700.06172011/10/25 21:02:490B / 42B / 28B

Lua _

RankUserSizeTimeDateStatistics
1twobit1040.02892011/10/28 00:26:370B / 69B / 23B

BASIC _

RankUserSizeTimeDateStatistics
1*yuko*1060.03442011/11/08 01:13:060B / 53B / 46B
2*yuko*(uru)920.02952011/11/13 21:34:540B / 45B / 43B

J _

RankUserSizeTimeDateStatistics
1I., S.180.06092011/10/26 23:02:430B / 6B / 12B
2Hendrik240.07952011/11/07 04:57:130B / 7B / 17B
3medialuna470.04102014/10/11 22:00:280B / 12B / 32B

A+ _

RankUserSizeTimeDateStatistics
1teebee440.07172011/11/01 13:42:529B / 20B / 14B

K _

RankUserSizeTimeDateStatistics
1twobit130.02872012/03/20 06:58:330B / 4B / 9B

C _

RankUserSizeTimeDateStatistics
1inaniwa1060.02532011/10/27 17:06:030B / 54B / 49B

Haskell _

RankUserSizeTimeDateStatistics
1notogawa650.04272011/10/25 23:43:560B / 41B / 22B
2koyama41700.02712011/10/26 22:27:090B / 45B / 23B
3Icewing740.02822011/10/26 20:08:210B / 49B / 22B
4feuermonster740.02682011/10/26 20:52:110B / 44B / 28B

Pascal _

RankUserSizeTimeDateStatistics
1*yuko*1220.02662011/10/30 12:28:580B / 82B / 36B
2uru(*yuko*)950.02562011/11/13 03:31:470B / 66B / 25B
3uru1150.02632011/11/13 03:21:010B / 76B / 35B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*1340.02722011/11/08 04:59:440B / 72B / 54B
2*yuko*1320.02772011/11/11 12:18:330B / 72B / 54B

AWK _

RankUserSizeTimeDateStatistics
1I., S.590.04412011/10/28 06:24:290B / 24B / 35B

Bash _

RankUserSizeTimeDateStatistics
1eban450.14362011/11/10 19:28:530B / 23B / 14B

R _

RankUserSizeTimeDateStatistics
1floybix620.89122011/11/07 21:09:050B / ?B / ?B
2pooq670.59112011/10/30 06:12:260B / 42B / 22B

GolfScript _

RankUserSizeTimeDateStatistics
1leonid110.08532011/11/08 05:01:270B / 2B / 9B
2narb110.06682011/11/08 16:33:050B / 2B / 9B
3tails140.07642011/11/03 17:04:500B / 5B / 9B

FlogScript _

RankUserSizeTimeDateStatistics
1milieu130.22452011/11/18 02:07:300B / ?B / ?B

Vim _

RankUserSizeTimeDateStatistics
1clock270.11742011/11/04 00:51:172B / 16B / 8B
2clock250.12472011/11/18 10:57:582B / 14B / 8B

goruby _

RankUserSizeTimeDateStatistics
1clock230.06492011/10/25 21:27:260B / 9B / 12B
2leonid230.08482011/11/01 02:15:000B / 10B / 10B

Groovy _

RankUserSizeTimeDateStatistics
1nn752.35062011/10/26 00:21:200B / 45B / 27B
2nn702.03812011/11/09 00:52:570B / 39B / 29B

Language Ranking_

RankLangUserSizeScore
1GolfScriptleonid1110000
2FlogScriptmilieu138461
3Ktwobit138461
4JI., S.186111
5gorubyclock234782
6Vimclock254400
7Perltails264230
8Rubyleonid274074
9A+teebee442500
10Basheban452444
11PHPclock462391
12AWKI., S.591864
13Pythonleonid611803
14Rfloybix621774
15JavaScript0mg641718
16Haskellnotogawa651692
17Groovynn701571
18Ioteebee(pooq)751466
19Schemekaki921195
20BASIC*yuko*(uru)921195
21Pascaluru(*yuko*)951157
22Luatwobit1041057
23Common LISPkurohuku1051047
24Cinaniwa1061037
25Fortran*yuko*132833

return to the top page