Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -4,17 +4,17 @@ package require http
|
|||
proc chooseOrderedWords list {
|
||||
set len 0
|
||||
foreach word $list {
|
||||
# Condition to determine whether a word is ordered; are its characters
|
||||
# in sorted order?
|
||||
if {$word eq [join [lsort [split $word ""]] ""]} {
|
||||
if {[string length $word] > $len} {
|
||||
set len [string length $word]
|
||||
set orderedOfMaxLen {}
|
||||
}
|
||||
if {[string length $word] == $len} {
|
||||
lappend orderedOfMaxLen $word
|
||||
}
|
||||
}
|
||||
# Condition to determine whether a word is ordered; are its characters
|
||||
# in sorted order?
|
||||
if {$word eq [join [lsort [split $word ""]] ""]} {
|
||||
if {[string length $word] > $len} {
|
||||
set len [string length $word]
|
||||
set orderedOfMaxLen {}
|
||||
}
|
||||
if {[string length $word] == $len} {
|
||||
lappend orderedOfMaxLen $word
|
||||
}
|
||||
}
|
||||
}
|
||||
return $orderedOfMaxLen
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue