https://codegolf.codidact.com/categories/49/tags/5525.rssNew Posts Tagged 'list' - Code GolfCode Golf - Codidact2024-03-11T23:16:09Zhttps://codegolf.codidact.com/posts/289542Word suggestingtrichoplaxhttps://codegolf.codidact.com/users/538902023-08-28T16:10:23Z2024-03-11T23:16:09Z<p>Suggest a word from a word list, given a string.</p>
<h2>Motivation</h2>
<p>Imagine typing a word one letter at a time, and seeing a suggested word after each letter is typed. At first the sug...https://codegolf.codidact.com/posts/290437Is it stuck in a counting loop?WheatWizardhttps://codegolf.codidact.com/users/543162023-12-14T14:56:41Z2024-03-03T01:51:05Z<p>Given a list of non-negative integers the function $f$ replaces every integer with the number of identical integers preceding it (not necessarily contiguously). So</p>
<pre><code>f [1,1,2,2,1,3...https://codegolf.codidact.com/posts/288755A word suggester [FINALIZED]trichoplaxhttps://codegolf.codidact.com/users/538902023-06-28T11:53:03Z2023-08-28T16:11:47Z<h1>Now posted: <a href="https://codegolf.codidact.com/posts/289542">Word suggesting</a></h1>
<hr>
<p>Suggest a word from a word list, given a string.</p>
<h2>Motivation</h2>
<p>Imagine typing ...https://codegolf.codidact.com/posts/288516Calculate the Z-arrayWheatWizardhttps://codegolf.codidact.com/users/543162023-06-18T13:20:16Z2023-06-23T17:46:58Z<h2>Task</h2>
<p>Given a list of numbers $X$ produce a second list of numbers $Y$ such that $Y_i$ is the length of the longest common prefix of $X$ and $X$ with the first $i$ elements removed.</p>...https://codegolf.codidact.com/posts/283108Are All Elements Equal?[FINALIZED]Razetimehttps://codegolf.codidact.com/users/533102021-08-04T17:15:09Z2023-06-19T10:25:52Z<h1>Challenge</h1>
<p>Given a list of integers >= 0 , check if all of them are equal.</p>
<h1>Tests</h1>
<pre><code>[1,1,1,1,1] -> true
[0,1,1,6,7] -> false
[1] -> true
...https://codegolf.codidact.com/posts/283305Are All Elements Equal? Razetimehttps://codegolf.codidact.com/users/533102021-08-11T12:49:41Z2022-06-05T05:41:30Z<h1>Challenge</h1>
<p>Given a list of integers >= 0 , check if all of them are equal.</p>
<h1>Tests</h1>
<pre><code>[1,1,1,1,1] -> true
[0,1,1,6,7] -> false
[1] -> true
...https://codegolf.codidact.com/posts/284166Play dominoes using stringsHakerh400https://codegolf.codidact.com/users/535792021-09-12T17:37:10Z2021-09-12T17:37:10Z<h2>Challenge</h2>
<p>Given two lists of strings $A$ and $B$, both of length $n\ge1$. For any $i\in\left\{1,\dots,n\right\}$, by $A_i$ and $B_i$ we represent the $i$-th string from $A$ and $B$, re...