Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #59683 > unrolled thread
| Started by | "Robert L." <No_spamming@noWhere_7073.org> |
|---|---|
| First post | 2017-05-21 18:28 +0000 |
| Last post | 2017-05-21 18:28 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.forth
Rosetta Code: Longest common subsequence "Robert L." <No_spamming@noWhere_7073.org> - 2017-05-21 18:28 +0000
| From | "Robert L." <No_spamming@noWhere_7073.org> |
|---|---|
| Date | 2017-05-21 18:28 +0000 |
| Subject | Rosetta Code: Longest common subsequence |
| Message-ID | <ofsm9a$mnd$1@gioia.aioe.org> |
> The longest common subsequence (or LCS) of groups A and B is > the longest group of elements from A and B that are common > between the two groups and in the same order in each group. > For example, the sequences "1234" and "1224533324" have an LCS > of "1234": > For a string example, consider the sequences "thisisatest" and > "testing123testing". An LCS would be "tsitest": > In this puzzle, your code only needs to deal with strings. > Write a function which returns an LCS of two strings > (case-sensitive). You don't need to show multiple LCS's. (use util.lcs) (define (string-lcs . args) (list->string (apply lcs (map string->list args)))) (string-lcs "thisisatest" "testing123testing") ===> "tsitest" (string-lcs "1234" "1224533324") ===> "1234" (string-lcs "123456" "1a2b3c") ===> "123" (string-lcs "rosettacode" "raisethysword") ===> "rsetod" -- Germany: Afghan Migrants Force Teen Boy To Perform Oral Sex at Swimming Pool. The Afghan men, aged 20 and 25, are said to have cornered the 14-year-old in the showers, where they forced him to perform sexual acts on both of them. infostormer.com/germany-afghan-migrants-force-teen-boy-to-perform-oral-sex-at-swimming-pool
Back to top | Article view | comp.lang.forth
csiph-web