De Bruijn sequences: Difference between revisions

m (→‎{{header|J}}: J's sort is a stable sort)
(5 intermediate revisions by 4 users not shown)
Line 84:
{{trans|D}}
 
<langsyntaxhighlight lang="11l">V digits = ‘0123456789’
 
F deBruijn(k, n)
Line 148:
db[4443] = ‘.’
print("\nValidating the overlaid deBruijn sequence:")
validate(db)</langsyntaxhighlight>
 
{{out}}
Line 173:
 
=={{header|8080 Assembly}}==
<langsyntaxhighlight lang="8080asm">bdos: equ 5 ; BDOS entry point
putch: equ 2 ; Write character to console
puts: equ 9 ; Write string to console
Line 439:
arr: equ ($/256+1)*256 ; Place to store a[] (page-aligned)
val: equ arr+40 ; Place to store validation flags
seq: equ val+10000 ; Place to store De Bruijn sequence</langsyntaxhighlight>
 
{{out}}
Line 454:
=={{header|8086 Assembly}}==
 
<langsyntaxhighlight lang="asm">putch: equ 2 ; Print character
puts: equ 9 ; Print string
cpu 8086
Line 653:
arr: resb 40 ; a[]
val: resb 10000 ; validation array
seq: equ $</langsyntaxhighlight>
 
{{out}}
Line 668:
=={{header|Ada}}==
{{trans|D}}
<langsyntaxhighlight Adalang="ada">with Ada.Text_IO; use Ada.Text_IO;
with Ada.Strings.Fixed; use Ada.Strings;
with Ada.Strings.Unbounded;
Line 793:
Validate (Ovl);
New_Line;
end De_Bruijn_Sequences;</langsyntaxhighlight>
 
{{out}}
Line 820:
 
=={{header|BASIC}}==
<langsyntaxhighlight lang="gwbasic">10 DEFINT A-Z
20 K = 10: N = 4
30 DIM A(K*N), S(K^N+N), T(5), P(5), V(K^N\8)
Line 891:
770 IF M THEN PRINT " none";
780 PRINT " missing."
790 RETURN</langsyntaxhighlight>
{{out}}
<pre>Length: 10000
Line 908:
=={{header|C sharp|C#}}==
{{trans|Kotlin}}
<langsyntaxhighlight lang="csharp">using System;
using System.Collections.Generic;
using System.Text;
Line 1,011:
}
}
}</langsyntaxhighlight>
{{out}}
<pre>The length of the de Bruijn sequence is 10003
Line 1,034:
=={{header|C++}}==
{{trans|D}}
<langsyntaxhighlight lang="cpp">#include <algorithm>
#include <functional>
#include <iostream>
Line 1,148:
 
return 0;
}</langsyntaxhighlight>
{{out}}
<pre>The length of the de Bruijn sequence is 10003
Line 1,170:
 
=={{header|CLU}}==
<langsyntaxhighlight lang="clu">% Generate the De Bruijn sequence consisiting of N-digit numbers
de_bruijn = cluster is generate
rep = null
Line 1,272:
db := string$substr(db, 1, 4443) || "." || string$rest(db, 4445)
validate(po, db, 4)
end start_up</langsyntaxhighlight>
{{out}}
<pre>Length: 10000
Line 1,287:
=={{header|D}}==
{{trans|Kotlin}}
<langsyntaxhighlight lang="d">import std.array;
import std.conv;
import std.format;
Line 1,383:
writeln("\nValidating the overlaid deBruijn sequence:");
validate(db);
}</langsyntaxhighlight>
{{out}}
<pre>The length of the de Bruijn sequence is 10003
Line 1,403:
PIN number 5814 missing
PIN number 8145 missing</pre>
 
=={{header|EasyLang}}==
{{trans|Lua}}
<syntaxhighlight>
global a[] seq[] k n .
proc db t p . .
if t > n
if n mod p = 0
for i = 1 to p
seq[] &= a[i + 1]
.
.
else
a[t + 1] = a[t - p + 1]
db t + 1 p
j = a[t - p + 1] + 1
while j < k
a[t + 1] = j mod 256
db t + 1 t
j += 1
.
.
.
func$ debruijn k0 n0 .
k = k0
n = n0
a[] = [ ]
len a[] k * n
seq[] = [ ]
db 1 1
for v in seq[]
buf$ &= v
.
buf$ &= substr buf$ 1 (n - 1)
return buf$
.
func alldigits s$ .
for c$ in strchars s$
if strcode c$ < 48 or strcode c$ > 57
return 0
.
.
return 1
.
proc validate db$ . .
len found[] 10000
for i = 1 to len db$ - 3
s$ = substr db$ i 4
if alldigits s$ = 1
n = number s$
found[n + 1] += 1
.
.
for i = 1 to 10000
if found[i] = 0
errs$[] &= " PIN number " & i - 1 & " missing"
elif found[i] > 1
errs$[] &= " PIN number " & i - 1 & " occurs " & found[i] & " times"
.
.
if len errs$[] = 0
print " No errors found"
else
for s$ in errs$[]
print s$
.
.
.
proc main . .
db$ = debruijn 10 4
print "The length of the de Bruijn sequence is " & len db$
print ""
write "The first 130 digits of the de Bruijn sequence are: "
print substr db$ 1 130
print ""
write "The last 130 digits of the de Bruijn sequence are: "
print substr db$ -130 130
print ""
print "Validating the de Bruijn sequence:"
validate db$
print ""
print "Validating the reversed de Bruijn sequence:"
for i = len db$ downto 1
dbr$ &= substr db$ i 1
.
validate dbr$
print ""
db$ = substr db$ 1 4443 & "." & substr db$ 4445 (1 / 0)
print "Validating the overlaid de Bruijn sequence:"
validate db$
print ""
.
main
</syntaxhighlight>
 
=={{header|Go}}==
<langsyntaxhighlight lang="go">package main
 
import (
Line 1,514 ⟶ 1,608:
fmt.Println("\nValidating the overlaid de Bruijn sequence:")
validate(db)
}</langsyntaxhighlight>
 
{{out}}
Line 1,542 ⟶ 1,636:
=={{header|Groovy}}==
{{trans|Java}}
<langsyntaxhighlight lang="groovy">import java.util.function.BiConsumer
 
class DeBruijn {
Line 1,653 ⟶ 1,747:
validate(sb.toString())
}
}</langsyntaxhighlight>
{{out}}
<pre>The length of the de Bruijn sequence is 10003
Line 1,678 ⟶ 1,772:
Straight-forward implementation of inverse Burrows—Wheeler transform [[wp:De_Bruijn_sequence#Construction|De_Bruijn_sequence#Construction] is reasonably efficient for the task (about a milliseconds for B(10,4) in GHCi).
 
<langsyntaxhighlight lang="haskell">import Data.List
import Data.Map ((!))
import qualified Data.Map as M
Line 1,703 ⟶ 1,797:
deBruijn :: Ord a => [a] -> Int -> [a]
deBruijn s n = let lw = concat $ lyndonWords n s
in lw ++ take (n-1) lw</langsyntaxhighlight>
 
<pre>λ> cycleForm [1,4,3,2,0]
Line 1,716 ⟶ 1,810:
The task.
 
<langsyntaxhighlight lang="haskell">import Control.Monad (replicateM)
 
main = do
Line 1,730 ⟶ 1,824:
 
let db' = a ++ ('.': tail b) where (a,b) = splitAt 4444 db
putStrLn $ "Words not in the corrupted sequence: " ++ unwords (validate db') </langsyntaxhighlight>
 
<pre>λ> main
Line 1,744 ⟶ 1,838:
{{trans|Python}}
 
<langsyntaxhighlight lang="haskell">import Control.Monad.State
import Data.Array (Array, listArray, (!), (//))
import qualified Data.Array as A
Line 1,772 ⟶ 1,866:
seqn = db 1 1 `evalState` listArray (0, k*n-1) (repeat 0)
in [ s !! i | i <- seqn ++ take (n-1) seqn ]</langsyntaxhighlight>
 
=={{header|J}}==
definitions. The C. verb computes the cycles. J's sort is a stable sort.
<langsyntaxhighlight Jlang="j">NB. implement inverse Burrows—Wheeler transform sequence method
 
repeat_alphabet=: [: , [: i.&> (^ <:) # [
Line 1,786 ⟶ 1,880:
groups=: [ ]\ ] , ({.~ <:)~ NB. length x infixes of sequence y cyclically extended by x-1
verify_PINs=: (/:~@:groups -: pins@:[) NB. LENGTH verify_PINs SEQUENCE
</langsyntaxhighlight>Task<syntaxhighlight lang J="j"> NB. A is the sequence
A=: 10 de_bruijn 4
 
Line 1,805 ⟶ 1,899:
4 verify_PINs (a.i.'.') (<: 4444)} A
0
</syntaxhighlight>
</lang>
 
=={{header|Java}}==
{{trans|C++}}
<langsyntaxhighlight lang="java">import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Line 1,923 ⟶ 2,017:
validate(sb.toString());
}
}</langsyntaxhighlight>
{{out}}
<pre>The length of the de Bruijn sequence is 10003
Line 1,943 ⟶ 2,037:
PIN number 5814 is missing
PIN number 8145 is missing</pre>
 
=={{header|jq}}==
'''Adapted from [[#Wren|Wren]]'''
 
'''Works with gojq, the Go implementation of jq'''
<syntaxhighlight lang="jq">
def allDigits:
all(explode[]; 48 <= . and . <= 57);
 
def lpad($len): tostring | ($len - length) as $l | ("0" * $l) + .;
 
def deBruijn:
{deBruijn: ""}
| reduce range(0; 100) as $n (.;
($n|lpad(2)) as $a
| ($a | explode) as [$a1, $a2]
| if $a2 >= $a1
then .deBruijn += (if ($a1 == $a2) then ([$a1]|implode) else $a end)
| .m = $n + 1
| until(.m > 99;
(.m|lpad(2)) as $ms
| if ($ms[1:2]|explode[0]) > $a1
then .deBruijn += $a + $ms
end
| .m += 1 )
end )
| .deBruijn + "000" ;
 
def describe:
. as $d
| "de Bruijn sequence length: \($d|length)",
"First 130 characters:",
$d[0:130],
"Last 130 characters:",
$d[-130:];
 
def check:
. as $text
| { res: [],
found: [range(0;10000) | 0],
k: 0 }
| reduce range( 0; $text|length-3) as $i (.;
$text[$i : $i+4] as $s
| if ($s|allDigits)
then .k = ($s|tonumber)
| .found[.k] += 1
end )
| reduce range(0; 10000) as $i (.;
.k = .found[$i]
| if .k != 1
then (" Pin number \($i) "
+ (if .k == 0 then "missing" else "occurs \(.k) times" end ) ) as $e
| .res += [$e]
end )
| .k = (.res|length)
| if .k == 0
then .res = "No errors found"
else
(if .k == 1 then "" else "s" end) as $s
| .res = "\(.k) error\($s) found:\n" + (.res | join("\n"))
end
| .res ;
 
# The tasks
deBruijn
| describe,
"Missing 4 digit PINs in this sequence: \(check)",
"Missing 4 digit PINs in the reversed sequence: \(explode|reverse|implode|check)",
"4,444th digit in the sequence: '\(.[4443])' (setting it to '.')",
( .[0:4443] + "." + .[4444:]
| "Re-running checks: \(check)" )
</syntaxhighlight>
{{output}}
<pre>
de Bruijn sequence length: 10003
First 130 characters:
0000100020003000400050006000700080009001100120013001400150016001700180019002100220023002400250026002700280029003100320033003400350
Last 130 characters:
6898689969697769786979698769886989699769986999777787779778877897798779978787978887889789878997979887989799879998888988998989999000
Missing 4 digit PINs in this sequence: No errors found
Missing 4 digit PINs in the reversed sequence: No errors found
4,444th digit in the sequence: '4' (setting it to '.')
Re-running checks: 4 errors found:
Pin number 1459 missing
Pin number 4591 missing
Pin number 5814 missing
Pin number 8145 missing
</pre>
 
=={{header|Julia}}==
<langsyntaxhighlight lang="julia">function debruijn(k::Integer, n::Integer)
alphabet = b"0123456789abcdefghijklmnopqrstuvwxyz"[1:k]
a = zeros(UInt8, k * n)
Line 1,990 ⟶ 2,173:
print("Testing the reversed sequence: "), verifyallPIN(reverse(s), 10, 4)
println("\nAfter replacing 4444th digit with \'.\':"), verifyallPIN(s, 10, 4, 4444)
</langsyntaxhighlight>{{out}}
<pre>
The length of the sequence is 10003. The first 130 digits are:
Line 2,009 ⟶ 2,192:
=={{header|Kotlin}}==
{{trans|Go}}
<langsyntaxhighlight lang="scala">const val digits = "0123456789"
 
fun deBruijn(k: Int, n: Int): String {
Line 2,102 ⟶ 2,285:
println("\nValidating the overlaid deBruijn sequence:")
validate(db)
}</langsyntaxhighlight>
{{out}}
<pre>The length of the de Bruijn sequence is 10003
Line 2,125 ⟶ 2,308:
=={{header|Lua}}==
{{trans|C++}}
<langsyntaxhighlight lang="lua">function tprint(tbl)
for i,v in pairs(tbl) do
print(v)
Line 2,236 ⟶ 2,419:
end
 
main()</langsyntaxhighlight>
{{out}}
<pre>The length of the de Bruijn sequence is 10003
Line 2,257 ⟶ 2,440:
 
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<langsyntaxhighlight Mathematicalang="mathematica">seq = DeBruijnSequence[Range[0, 9], 4];
seq = seq~Join~Take[seq, 3];
Length[seq]
Line 2,274 ⟶ 2,457:
StringDrop[ToString[NumberForm[#, 4, NumberPadding -> {"0", "0"}]],
1] & /@ Range[0, 9999],
Union[StringJoin /@ Partition[ToString /@ seq, 4, 1]]]</langsyntaxhighlight>
 
{{out}}
Line 2,296 ⟶ 2,479:
=={{header|Nim}}==
{{trans|D}}
<langsyntaxhighlight Nimlang="nim">import algorithm, parseutils, strformat, strutils
 
const Digits = "0123456789"
Line 2,377 ⟶ 2,560:
db[4443] = '.'
echo "Validating the overlaid deBruijn sequence:"
db.validate()</langsyntaxhighlight>
 
{{out}}
Line 2,403 ⟶ 2,586:
 
For a given word length n, constructs a de Bruijn sequence by concatenating, in lexicographic order, all the Lyndon words whose length divides n. (See Wikipedia article "de Bruijn sequence", section "Construction".)
<langsyntaxhighlight lang="pascal">
program deBruijnSequence;
uses SysUtils;
Line 2,519 ⟶ 2,702:
end;
end.
</syntaxhighlight>
</lang>
{{out}}
<pre>
Line 2,545 ⟶ 2,728:
=={{header|Perl}}==
{{trans|Raku}}
<langsyntaxhighlight lang="perl">use strict;
use warnings;
use feature 'say';
Line 2,582 ⟶ 2,765:
substr $seq, 4443, 1, 5;
say "Incorrect 4 digit PINs in the revised sequence:";
check $seq;</langsyntaxhighlight>
{{out}}
<pre>de Bruijn sequence length: 10003
Line 2,608 ⟶ 2,791:
{{trans|zkl}}
{{trans|Go}}
<!--<langsyntaxhighlight Phixlang="phix">(phixonline)-->
<span style="color: #004080;">string</span> <span style="color: #000000;">deBruijn</span> <span style="color: #0000FF;">=</span> <span style="color: #008000;">""</span>
<span style="color: #008080;">for</span> <span style="color: #000000;">n</span><span style="color: #0000FF;">=</span><span style="color: #000000;">0</span> <span style="color: #008080;">to</span> <span style="color: #000000;">99</span> <span style="color: #008080;">do</span>
Line 2,660 ⟶ 2,843:
<span style="color: #000000;">deBruijn</span><span style="color: #0000FF;">[</span><span style="color: #000000;">4444</span><span style="color: #0000FF;">]</span> <span style="color: #0000FF;">=</span> <span style="color: #008000;">'.'</span>
<span style="color: #7060A8;">printf</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"Re-running checks: %s\n"</span><span style="color: #0000FF;">,</span><span style="color: #000000;">check</span><span style="color: #0000FF;">(</span><span style="color: #000000;">deBruijn</span><span style="color: #0000FF;">))</span>
<!--</langsyntaxhighlight>-->
{{out}}
<pre>
Line 2,682 ⟶ 2,865:
 
=={{header|Python}}==
<langsyntaxhighlight lang="python">
# from https://en.wikipedia.org/wiki/De_Bruijn_sequence
 
Line 2,774 ⟶ 2,957:
print("Validating the overlaid deBruijn sequence:")
validate(dboverlaid)
</syntaxhighlight>
</lang>
{{out}}
<pre>
Line 2,801 ⟶ 2,984:
{{trans|Go}}
 
<langsyntaxhighlight lang="racket">#lang racket
(define (de-bruijn k n)
Line 2,846 ⟶ 3,029:
(validate "" seq)
(validate "reversed " (reverse seq))
(validate "overlaid " (list-update seq 4443 add1))</langsyntaxhighlight>
 
{{out}}
Line 2,877 ⟶ 3,060:
Deviates very slightly from the task spec. Generates a randomized de Bruijn sequence and replaces the 4444th digit with a the digit plus 1 mod 10 rather than a '.', mostly so it can demonstrate detection of extra PINs as well as missing ones.
 
<syntaxhighlight lang="raku" perl6line># Generate the sequence
my $seq;
 
Line 2,918 ⟶ 3,101:
put "Incorrect 4 digit PINs in the revised sequence:";
$seq.substr-rw(4443,1) = $digit;
check $seq;</langsyntaxhighlight>
{{out|Sample output}}
<pre>de Bruijn sequence length: 10003
Line 2,944 ⟶ 3,127:
The &nbsp; de Bruijn &nbsp; sequence generated by these REXX programs are identical to the sequence shown on the &nbsp; ''discussion'' &nbsp; page &nbsp; (1<sup>st</sup> topic).
=== hard-coded node to be removed ===
<langsyntaxhighlight lang="rexx">/*REXX pgm calculates the de Bruijn sequence for all pin numbers (4 digit decimals). */
$= /*initialize the de Bruijn sequence. */
#=10; lastNode= (#-2)(#-2)(#-1)(#-2) /*this number is formed when this # ···*/
Line 2,991 ⟶ 3,174:
if e==0 then e= 'No' /*Gooder English (sic) the error count.*/
say _ e 'errors found.' /*display the number of errors found. */
return</langsyntaxhighlight>
{{out|output}}
<pre>
Line 3,020 ⟶ 3,203:
 
This method slightly bloats the program and slows execution.
<langsyntaxhighlight lang="rexx">/*REXX pgm calculates the de Bruijn sequence for all pin numbers (4 digit decimals). */
$= /*initialize the de Bruijn sequence. */
do j=0 for 10; $= $ j; jj= j || j /*compose the left half of the numbers.*/
Line 3,067 ⟶ 3,250:
if e==0 then e= 'No' /*Gooder English (sic) the error count.*/
say _ e 'errors found.' /*display the number of errors found. */
return</langsyntaxhighlight>
{{out|output|text=&nbsp; is identical to the 1<sup>st</sup> REXX version.}} <br>
 
=={{header|Ruby}}==
{{trans|D}}
<langsyntaxhighlight lang="ruby">def deBruijn(k, n)
alphabet = "0123456789"
@a = Array.new(k * n, 0)
Line 3,144 ⟶ 3,327:
db[4443] = '.'
print "Validating the overlaid de Bruijn sequence:\n"
validate(db)</langsyntaxhighlight>
{{out}}
<pre>The length of the de Bruijn sequence is 10003
Line 3,161 ⟶ 3,344:
PIN number 5814 missing
PIN number 8145 missing</pre>
 
=={{header|Scala}}==
{{trans|Java}}
<syntaxhighlight lang="Scala">
import scala.collection.mutable.ListBuffer
 
object DeBruijn {
 
def deBruijn(k: Int, n: Int): String = {
val a = Array.fill[Byte](k * n)(0)
val seq = new ListBuffer[Byte]()
 
def db(t: Int, p: Int): Unit = {
if (t > n) {
if (n % p == 0) {
seq ++= a.slice(1, p + 1)
}
} else {
a(t) = a(t - p)
db(t + 1, p)
for (j <- (a(t - p) + 1).until(k)) {
a(t) = j.toByte
db(t + 1, t)
}
}
}
 
db(1, 1)
 
val sb = new StringBuilder
seq.foreach(i => sb.append("0123456789".charAt(i)))
sb.append(sb.subSequence(0, n - 1)).toString
}
 
private def allDigits(s: String): Boolean = s.forall(_.isDigit)
 
private def validate(db: String): Unit = {
val found = Array.fill(10000)(0)
val errs = ListBuffer[String]()
 
for (i <- 0 until db.length - 3) {
val s = db.substring(i, i + 4)
if (allDigits(s)) {
val n = s.toInt
found(n) += 1
}
}
 
for (i <- found.indices) {
if (found(i) == 0) errs += s" PIN number $i is missing"
else if (found(i) > 1) errs += s" PIN number $i occurs ${found(i)} times"
}
 
if (errs.isEmpty) println(" No errors found")
else {
val pl = if (errs.size == 1) "" else "s"
println(s" ${errs.size} error$pl found:")
errs.foreach(println)
}
}
 
def main(args: Array[String]): Unit = {
val db = deBruijn(10, 4)
 
println(s"The length of the de Bruijn sequence is ${db.length}\n")
println(s"The first 130 digits of the de Bruijn sequence are: ${db.take(130)}\n")
println(s"The last 130 digits of the de Bruijn sequence are: ${db.takeRight(130)}\n")
 
println("Validating the de Bruijn sequence:")
validate(db)
 
println()
println("Validating the reversed de Bruijn sequence:")
validate(db.reverse)
 
val overlaidDb = db.updated(4443, '.')
println()
println("Validating the overlaid de Bruijn sequence:")
validate(overlaidDb)
}
}
</syntaxhighlight>
{{out}}
<pre>
The length of the de Bruijn sequence is 10003
 
The first 130 digits of the de Bruijn sequence are: 0000100020003000400050006000700080009001100120013001400150016001700180019002100220023002400250026002700280029003100320033003400350
 
The last 130 digits of the de Bruijn sequence are: 6898689969697769786979698769886989699769986999777787779778877897798779978787978887889789878997979887989799879998888988998989999000
 
Validating the de Bruijn sequence:
No errors found
 
Validating the reversed de Bruijn sequence:
No errors found
 
Validating the overlaid de Bruijn sequence:
4 errors found:
PIN number 1459 is missing
PIN number 4591 is missing
PIN number 5814 is missing
PIN number 8145 is missing
 
</pre>
 
 
=={{header|Visual Basic .NET}}==
{{trans|C#}}
<langsyntaxhighlight lang="vbnet">Imports System.Text
 
Module Module1
Line 3,267 ⟶ 3,555:
End Sub
 
End Module</langsyntaxhighlight>
{{out}}
<pre>The first 130 digits of the de Bruijn sequence are: 0000100020003000400050006000700080009001100120013001400150016001700180019002100220023002400250026002700280029003100320033003400350
Line 3,290 ⟶ 3,578:
{{libheader|Wren-fmt}}
{{libheader|Wren-str}}
<langsyntaxhighlight ecmascriptlang="wren">import "./fmt" for Fmt
import "./str" for Str
var deBruijn = ""
Line 3,348 ⟶ 3,636:
System.print("\n4,444th digit in the sequence: '%(deBruijn[4443])' (setting it to '.')")
deBruijn = deBruijn[0..4442] + "." + deBruijn[4444..-1]
System.print("Re-running checks: %(check.call(deBruijn))")</langsyntaxhighlight>
 
{{out}}
Line 3,373 ⟶ 3,661:
=={{header|zkl}}==
{{trans|Raku}}
<langsyntaxhighlight lang="zkl">dbSeq:=Data(); // a byte/character buffer
foreach n in (100){
a,a01,a11 := "%02d".fmt(n), a[0,1], a[1,1];
Line 3,383 ⟶ 3,671:
}
}
dbSeq.append("000");</langsyntaxhighlight>
<langsyntaxhighlight lang="zkl">seqText:=dbSeq.text;
println("de Bruijn sequence length: ",dbSeq.len());
 
Line 3,400 ⟶ 3,688:
println("\n4444th digit in the sequence: ", seqText[4443]);
dbSeq[4443]=".";
println("Setting the 4444th digit and reruning checks: ",chk(dbSeq.text).concat(" "));</langsyntaxhighlight>
{{out}}
<pre>
2,460

edits