<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Mens Clara</title>
    <subtitle>life, thoughts, projects, ideas</subtitle>
    <link rel="self" type="application/atom+xml" href="https://mensclara.com/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://mensclara.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2025-11-17T00:00:00+00:00</updated>
    <id>https://mensclara.com/atom.xml</id>
    <entry xml:lang="en">
        <title>A simple Leetcode setup</title>
        <published>2025-11-17T00:00:00+00:00</published>
        <updated>2025-11-17T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mensclara.com/essays/simple-leetcode-setup/"/>
        <id>https://mensclara.com/essays/simple-leetcode-setup/</id>
        
        <content type="html" xml:base="https://mensclara.com/essays/simple-leetcode-setup/">&lt;h2 id=&quot;why&quot;&gt;why&lt;&#x2F;h2&gt;
&lt;p&gt;Time to time I practice on platforms like Leetcode, Codewars, and others. I needed a simple way of organizing the tasks and solutions, a possibility to edit codes in an IDE, running tests. The problem with default approach is that typically you need to &quot;create a project&quot;, - so for Java it would be pom.xml and all that stuff; it works while you have just a few tasks, but it all dies when it is a hundred of them.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;what&quot;&gt;what&lt;&#x2F;h2&gt;
&lt;p&gt;This is a simple approach that allows quick editing, running tests from CLI, ordering and organizing tasks, using IDE without bloating &quot;projects&quot;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;files-and-folders&quot;&gt;files and folders&lt;&#x2F;h2&gt;
&lt;p&gt;I practice with a few languages, so I have fodler structure per-language.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;create a folder where you will keep your coding art - for example, &lt;code&gt;katas&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;create per-language subfolders. For example, &lt;code&gt;katas&#x2F;java&lt;&#x2F;code&gt; and &lt;code&gt;katas&#x2F;ts&lt;&#x2F;code&gt; (for TypeScript)&lt;&#x2F;li&gt;
&lt;li&gt;create folders for problems&#x27; complexity: &lt;code&gt;katas&#x2F;java&#x2F;easy&lt;&#x2F;code&gt;, &lt;code&gt;katas&#x2F;java&#x2F;medium&lt;&#x2F;code&gt;, &lt;code&gt;katas&#x2F;java&#x2F;hard&lt;&#x2F;code&gt;. Repeat for each language.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;vscode-workspace&quot;&gt;VSCode workspace&lt;&#x2F;h2&gt;
&lt;p&gt;Create &lt;code&gt;katas&#x2F;katas.code-workspace&lt;&#x2F;code&gt; file and put the following content into it:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;folders&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;: [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    { &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;ts&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    { &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;java&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    { &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;ocaml&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    { &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;lisp&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;  ],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;settings&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;: {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;    &#x2F;&#x2F; --- Keep the Java extension relaxed (important) ---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;java.import.maven.enabled&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;java.import.gradle.enabled&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;java.project.importOnFirstTimeStartup&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;disabled&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;java.configuration.updateBuildConfiguration&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;disabled&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;    &#x2F;&#x2F; Avoid aggressive indexing of random folders&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;search.exclude&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;: {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;**&#x2F;.git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;**&#x2F;.idea&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;**&#x2F;target&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;**&#x2F;.gradle&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;**&#x2F;node_modules&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;**&#x2F;_build&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;files.watcherExclude&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;: {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;**&#x2F;.git&#x2F;**&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;**&#x2F;.idea&#x2F;**&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;      &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;**&#x2F;node_modules&#x2F;**&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;So, now you can open in VSCode the workspace you just created, it will open the folder and show you the files tree.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;configuring-typescript&quot;&gt;configuring TypeScript&lt;&#x2F;h2&gt;
&lt;p&gt;For TypeScript solutions I use &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;deno.com&quot;&gt;Deno&lt;&#x2F;a&gt; - &quot;the open-source JavaScript runtime for the modern web&quot;. Go to their website and install it.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;configuring-deno-for-vscode&quot;&gt;configuring Deno for VSCode&lt;&#x2F;h3&gt;
&lt;p&gt;I use VSCode. If you use something else, you can skip this section.&lt;&#x2F;p&gt;
&lt;p&gt;Install Deno VSCode extension - that will help&lt;&#x2F;p&gt;
&lt;p&gt;To fix VSCode warnings, create &lt;code&gt;katas&#x2F;ts&#x2F;.vscode&#x2F;settings.json&lt;&#x2F;code&gt; with the following content:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;deno.enable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;deno.unstable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To enable Deno only in the TypeScript folder, create &lt;code&gt;katas&#x2F;.vscode&#x2F;settings.json&lt;&#x2F;code&gt; with the following content:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;deno.enable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;quot;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;using-the-typescript-approach&quot;&gt;using the TypeScript approach&lt;&#x2F;h3&gt;
&lt;p&gt;Create a new file &lt;code&gt;katas&#x2F;ts&#x2F;easy&#x2F;kata.test.ts&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;typescript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;&#x2F;&#x2F; code - here you write your solution&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;export function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E64553;font-style: italic;&quot;&gt;a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; number&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E64553;font-style: italic;&quot;&gt; b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; number&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; return&lt;&#x2F;span&gt;&lt;span&gt; a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;; }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;&#x2F;&#x2F; tests - here you put your tests&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Deno&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;test&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;sum works&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;, ()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;sum&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; !==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; throw&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;font-weight: bold;&quot;&gt; new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; Error&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;nope&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And now you can run it - open a terminal in the &lt;code&gt;katas&lt;&#x2F;code&gt; folder and run the command: &lt;code&gt;deno test ts&#x2F;easy&#x2F;kata.test.ts&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #179299;&quot;&gt;~&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;katas  deno test ts&#x2F;easy&#x2F;kata.test.ts&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;Check&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; file:&#x2F;&#x2F;&#x2F;Users&#x2F;as&#x2F;katas&#x2F;ts&#x2F;easy&#x2F;kata.test.ts&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;running&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; test from .&#x2F;ts&#x2F;easy&#x2F;kata.test.ts&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; works ... ok&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;ok&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; passed&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; failed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;What happened is that it run the test, the test run the solution function, 1 test passed and 0 tests failed.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;configuring-java&quot;&gt;configuring Java&lt;&#x2F;h2&gt;
&lt;p&gt;For Java solutions I use &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.jbang.dev&quot;&gt;JBang&lt;&#x2F;a&gt;. Go to their website and install it.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;adding-common-lib&quot;&gt;adding common lib&lt;&#x2F;h3&gt;
&lt;p&gt;With Java, it is usually convenient to have a set of helpers. So, create &lt;code&gt;katas&#x2F;java&#x2F;common&#x2F;CommonBase.java&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;java&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; org&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;junit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;platform&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;launcher&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;core&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;LauncherFactory&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; org&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;junit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;platform&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;launcher&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;core&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;LauncherDiscoveryRequestBuilder&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; org&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;junit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;platform&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;engine&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;discovery&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;DiscoverySelectors&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; org&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;junit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;platform&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;launcher&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;listeners&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;SummaryGeneratingListener&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; java&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;PrintWriter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt; * This class contains common test-running logic and helper utilities.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt; * It will be &amp;quot;included&amp;quot; by individual problems files.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt; * * JBang will automatically pull in the &#x2F;&#x2F;DEPS from this file.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt; *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;public class&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DF8E1D;font-style: italic;&quot;&gt; CommonBase&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;    &#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;     * A reusable test runner.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;     * &lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;@param&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E64553;font-style: italic;&quot;&gt; testClasses&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt; The specific test class(es) to run.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;     *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;    public static void&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; runTests&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;Class&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;gt;...&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E64553;font-style: italic;&quot;&gt; testClasses&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;        var&lt;&#x2F;span&gt;&lt;span&gt; launcher&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; LauncherFactory&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;create&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;        var&lt;&#x2F;span&gt;&lt;span&gt; listener&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; SummaryGeneratingListener&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        launcher&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;registerTestExecutionListeners&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;listener&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;        var&lt;&#x2F;span&gt;&lt;span&gt; requestBuilder&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; LauncherDiscoveryRequestBuilder&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;request&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;        &#x2F;&#x2F; Discover all test classes passed as arguments&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;        var&lt;&#x2F;span&gt;&lt;span&gt; selectors&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; new java&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;util&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;ArrayList&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;DiscoverySelectors&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;        for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;var&lt;&#x2F;span&gt;&lt;span&gt; testClass&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; :&lt;&#x2F;span&gt;&lt;span&gt; testClasses&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            requestBuilder&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;selectors&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;DiscoverySelectors&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;selectClass&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;testClass&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        launcher&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;execute&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;requestBuilder&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;build&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;        var&lt;&#x2F;span&gt;&lt;span&gt; summary&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; listener&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;getSummary&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;        var&lt;&#x2F;span&gt;&lt;span&gt; writer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; PrintWriter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;System&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;out&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        summary&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;printTo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;writer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        writer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;flush&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;();&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt; &#x2F;&#x2F; Make sure all output is printed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;        &#x2F;&#x2F; Exit with a non-zero code if tests failed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span&gt;summary&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;getTestsFailedCount&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            System&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;out&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;println&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EA76CB;&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;🔥 Some tests FAILED!&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            System&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;exit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;        }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; else&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            System&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;out&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;println&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EA76CB;&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;✅ All tests PASSED!&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;    &#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;     * A helper class for common LeetCode utilities.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;     * Example: public static ListNode buildList(int[] vals) { ... }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;     * Example: public static TreeNode buildTree(Integer[] vals) { ... }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;     *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;    public static class&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DF8E1D;font-style: italic;&quot;&gt; Helpers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;        &#x2F;&#x2F; Example helper:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;        public static void&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; printArray&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;int&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E64553;font-style: italic;&quot;&gt; arr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            System&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;out&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;println&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;java&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;util&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;Arrays&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;toString&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;arr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;        &#x2F;&#x2F; Add your other common helpers here&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;So it helps with running tests and various helpers can be placed here as well.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;using-the-java-approach&quot;&gt;using the Java approach&lt;&#x2F;h3&gt;
&lt;p&gt;Create a test solution &lt;code&gt;katas&#x2F;java&#x2F;easy&#x2F;TwoSum.java&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;java&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;&#x2F;&#x2F;DEPS org.junit.jupiter:junit-jupiter:5.10.2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;&#x2F;&#x2F;DEPS org.junit.platform:junit-platform-launcher:1.10.2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;&#x2F;&#x2F;SOURCES ..&#x2F;common&#x2F;CommonBase.java&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;&#x2F;&#x2F; We can import the test tools and helpers from the included file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; org&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;junit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;jupiter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;api&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;Test&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;import static&lt;&#x2F;span&gt;&lt;span&gt; org&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;junit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;jupiter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;api&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;Assertions&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;assertArrayEquals&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt; * This is the main file for the TwoSum problem.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt; *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;public class&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DF8E1D;font-style: italic;&quot;&gt; TwoSum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;  &#x2F;&#x2F; --- SOLUTION CLASS ---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;    class&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DF8E1D;font-style: italic;&quot;&gt; Solution&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;        public int&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; twoSum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;int&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E64553;font-style: italic;&quot;&gt; nums&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; int&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E64553;font-style: italic;&quot;&gt; target&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;            java&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;util&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;Map&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;Integer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; Integer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; map&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; new java&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;util&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;HashMap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;&amp;lt;&amp;gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;            for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;int&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span&gt; i &lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span&gt; nums&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;length&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;++&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;                int&lt;&#x2F;span&gt;&lt;span&gt; complement&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; target &lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt; nums&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;                if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; (&lt;&#x2F;span&gt;&lt;span&gt;map&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;containsKey&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;complement&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;)) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;                    return new int&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[] {&lt;&#x2F;span&gt;&lt;span&gt; map&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;get&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;complement&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;),&lt;&#x2F;span&gt;&lt;span&gt; i &lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;                }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                map&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;put&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;nums&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;],&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;            }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;            return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D20F39;&quot;&gt; null&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;    &#x2F;&#x2F; --- END OF SOLUTION CLASS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;    &#x2F;&#x2F; --- JUNIT TESTS ---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;    static class&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DF8E1D;font-style: italic;&quot;&gt; TwoSumTests&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt;        @Test&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;        void&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; testExample1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;            Solution&lt;&#x2F;span&gt;&lt;span&gt; sol&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; TwoSum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;().&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; Solution&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;            int&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[]&lt;&#x2F;span&gt;&lt;span&gt; nums&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 7&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 11&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 15&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;            int&lt;&#x2F;span&gt;&lt;span&gt; target&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 9&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;            &#x2F;&#x2F; You can use your helpers!&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;            &#x2F;&#x2F; printArray(sol.twoSum(nums, target)); &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;            assertArrayEquals&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;new int&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[]{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;},&lt;&#x2F;span&gt;&lt;span&gt; sol&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;twoSum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;nums&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; target&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt;        @Test&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;        void&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; testExample2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;            Solution&lt;&#x2F;span&gt;&lt;span&gt; sol&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; TwoSum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;().&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; Solution&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;            int&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[]&lt;&#x2F;span&gt;&lt;span&gt; nums&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;            int&lt;&#x2F;span&gt;&lt;span&gt; target&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;            assertArrayEquals&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;new int&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[]{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;},&lt;&#x2F;span&gt;&lt;span&gt; sol&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;twoSum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;nums&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; target&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;    &#x2F;&#x2F; --- END OF JUNIT TESTS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;    &#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;     * The main entry point.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;     * All it does is tell the CommonBase to run this file&amp;#39;s tests.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;     *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;    public static void&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;String&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E64553;font-style: italic;&quot;&gt; args&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        System&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;out&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;println&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;Running tests for TwoSum...&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        CommonBase&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;runTests&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span&gt;TwoSumTests&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;class&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now run command: &lt;code&gt;jbang java&#x2F;easy&#x2F;TwoSum.java&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;This is what you should see if everything works:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Running tests for TwoSum...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Test run finished after 41 ms&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[         2 containers found      ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[         0 containers skipped    ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[         2 containers started    ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[         0 containers aborted    ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[         2 containers successful ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[         0 containers failed     ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[         2 tests found           ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[         0 tests skipped         ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[         2 tests started         ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[         0 tests aborted         ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[         2 tests successful      ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[         0 tests failed          ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;✅ All tests PASSED!&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;conclusion&quot;&gt;conclusion&lt;&#x2F;h2&gt;
&lt;p&gt;I have a very simple approach of editing and testing code problems for platforms such as Leetcode and others.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Stay in touch</title>
        <published>2025-11-14T00:00:00+00:00</published>
        <updated>2025-11-14T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mensclara.com/essays/stay-in-touch/"/>
        <id>https://mensclara.com/essays/stay-in-touch/</id>
        
        <content type="html" xml:base="https://mensclara.com/essays/stay-in-touch/">&lt;h2 id=&quot;why&quot;&gt;why&lt;&#x2F;h2&gt;
&lt;p&gt;Most people are bad at keeping in touch, some (like me) are even worse. The folowing system can help with keeping networking and staying in touch with people.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;what&quot;&gt;what&lt;&#x2F;h2&gt;
&lt;p&gt;I met this idea first at &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;jakobgreenfeld.com&#x2F;stay-in-touch&quot;&gt;Jakob Greenfeld&#x27;s&lt;&#x2F;a&gt; and then found it at &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;sive.rs&#x2F;hundreds&quot;&gt;Derek Sivers&#x27;&lt;&#x2F;a&gt; website.&lt;&#x2F;p&gt;
&lt;p&gt;The idea is simple: you label contacts on fourth categories:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;a: very important, contact every three weeks&lt;&#x2F;li&gt;
&lt;li&gt;b: important, contact every two months&lt;&#x2F;li&gt;
&lt;li&gt;c: most people, contact every six onths&lt;&#x2F;li&gt;
&lt;li&gt;d: rest of the world, contact once a year&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Then you need some way of being reminded on time when you need&#x2F;want to ping a contact. Derek uses his private piece of software, Jakob solved this with Airtable.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;setup&quot;&gt;setup&lt;&#x2F;h3&gt;
&lt;p&gt;I don&#x27;t have hundreds of contacts, so I used &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;culturedcode.com&#x2F;things&#x2F;&quot;&gt;Things&lt;&#x2F;a&gt; - since I anyway have ben using it for years:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;create a new project named &quot;Stay in touch&quot; or &quot;Contacts&quot; or &quot;Relationships&quot; or whatever suits more for you&lt;&#x2F;li&gt;
&lt;li&gt;for each person, create a &lt;em&gt;repeating to-do&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;title&lt;&#x2F;em&gt;: e.g. &quot;Follow up with Jane Doe&quot;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;em&gt;when&lt;&#x2F;em&gt;: set the due date, e.g. Tomorrow&lt;&#x2F;li&gt;
&lt;li&gt;&lt;em&gt;repeat&lt;&#x2F;em&gt;: set this to your desired frequency (see the labels above), e.g. every two months&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;important&lt;&#x2F;strong&gt;: in the repeat settings, make sure it&#x27;s set to repeat &quot;After Completion&quot;. This means the &quot;next contact&quot; date is calculated from the day you check it off.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;workflow&quot;&gt;workflow&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;the &quot;Today&quot; list in Things is the &quot;Overdue&quot; list&lt;&#x2F;li&gt;
&lt;li&gt;when &quot;Follow up with Jane Doe&quot; appears, contact her&lt;&#x2F;li&gt;
&lt;li&gt;once you&#x27;ve &quot;stayed in touch,&quot; check off the task&lt;&#x2F;li&gt;
&lt;li&gt;things automatically files the completed task and schedules the next one for 2 months (or whatever frequency you set) from today. You don&#x27;t have to do any date entry or formula management.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;conclusion&lt;&#x2F;h3&gt;
&lt;p&gt;So, every once in a time I get a notification from Things that I need (or wanted) to reach out to someone; then I contact the person, ask how is life, invite for a dinner, etc.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Now</title>
        <published>2025-03-01T00:00:00+00:00</published>
        <updated>2025-03-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mensclara.com/now/"/>
        <id>https://mensclara.com/now/</id>
        
        <content type="html" xml:base="https://mensclara.com/now/">&lt;h2 id=&quot;updated-march-1st-2026-stockholm&quot;&gt;Updated: March 1st 2026, Stockholm&lt;&#x2F;h2&gt;
&lt;p&gt;Life is suffering.
Even the darkest regions have even darker corners.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;updated-november-30th-2025-stockholm&quot;&gt;Updated: November 30th 2025, Stockholm&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;reading&quot;&gt;Reading&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&quot;This is marketing&quot; by Seth Godin. Still reading. Every few pages I have an insight and need to think about it. Seth is really a guru in marketing.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;learning&quot;&gt;Learning&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;I ordered ZSA Voyager. Still practicing with blind typing. Waiting for the keys.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;working-on&quot;&gt;Working on&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;I updated my old (13 years old) project &lt;a href=&quot;&#x2F;projects&#x2F;dhcp-server-scanner&#x2F;&quot;&gt;DHCP server scanner&lt;&#x2F;a&gt;: fixed some major bugs, some minor bugs, added support of MacOS, added unit tests, added draft of *BSD support (I do not have a BSD machine under my hand, so can&#x27;t test the implementation). Back in 2014 some guys from &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Alcatel-Lucent&quot;&gt;Alcatel-Lucent&lt;&#x2F;a&gt; contacted me and asked if they could use this project in their commercial product. A small thing but I am still proud of it.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;updated-november-16th-2025-stockholm&quot;&gt;Updated: November 16th 2025, Stockholm&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;reading-1&quot;&gt;Reading&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&quot;This is marketing&quot; by Seth Godin&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;learning-1&quot;&gt;Learning&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;ten-fingers blind typing&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;working-on-1&quot;&gt;Working on&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;practicing leetcode, ocaml, sbcl&#x2F;lisp&lt;&#x2F;li&gt;
&lt;li&gt;playing with some raw ideas, discussing with Gemini&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;projects&quot;&gt;Projects&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;IconOfSweden is probably to close - no idea what to do with it.&lt;&#x2F;li&gt;
&lt;li&gt;CVResumeFree is still alive but probably will also close.&lt;&#x2F;li&gt;
&lt;li&gt;Insightigy as the original idea is dead. Playing with completely new idea. Currently this is just a local prototype. Perhaps will push the POC live next week.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;other&quot;&gt;Other&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;cancelled ChatGPT&lt;&#x2F;li&gt;
&lt;li&gt;thinking of migration from the Apple world towards more privacy-oriented solutions. Considering iPhone 14 Pro -&amp;gt; Pixel 8&#x2F;9 Pro, MacBook Pro M1 -&amp;gt; FrameWork 13&quot; laptop, iOS -&amp;gt; GrapheneOS&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;updated-november-2nd-2025-stockholm&quot;&gt;Updated: November 2nd 2025, Stockholm&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;reading-2&quot;&gt;Reading&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&quot;This is marketing&quot; by Seth Godin&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;working-on-2&quot;&gt;Working on&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;insightigy.com&quot;&gt;insightigy&lt;&#x2F;a&gt; project as the elite platform for professionals is probably not a good commerical idea. I am afraid I must consider other ideas and close this one.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;updated-october-21th-2025-stockholm&quot;&gt;Updated: October 21th 2025, Stockholm&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;reading-3&quot;&gt;Reading&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&quot;The fine art of small talk&quot; by Debra Fine&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;recently-read&quot;&gt;Recently read&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&quot;How to be yourself: Quiet your inner critic and rise above social anxiety&quot; by Elen Hendriksen. Highly recommend&lt;&#x2F;li&gt;
&lt;li&gt;&quot;Models: attract women through honesty&quot; by Mark Manson. This is a must-have (must-read) book. The front cover and the name might be confusing - this is not a book about pick-up as one might think, but this is a great book on relationships (not only men&#x2F;women but on human level in general), on how to be a man. Highly recommend&lt;&#x2F;li&gt;
&lt;li&gt;&quot;No more mr nice guy: a proven plan for getting what you want in love, sex, and life&quot; by Robert Glover. I read this book after the &quot;Models&quot; and it is a great extension to the topic. This is also a must-have book for a man. Highly recommend.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;working-on-3&quot;&gt;Working on&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Beta-testing my &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;insightigy.com&quot;&gt;online coaching platform&lt;&#x2F;a&gt; for high-paid professionals.&lt;&#x2F;li&gt;
&lt;li&gt;Building a &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;demo.instantcafesite.com&quot;&gt;website constructor for cafes and restaurants&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;life&quot;&gt;Life&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Moved to another apartment. Love this new district much more than the previous one.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;updated-october-13th-2024-from-my-apartment-in-stockholm-the-winter-is-coming&quot;&gt;Updated October 13th, 2024, from my apartment in Stockholm. The winter is coming.&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;reading-4&quot;&gt;Reading&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&quot;Calling Bullshit&quot; by Carl T. Bergstrom and Jevin D. West.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;working&quot;&gt;Working&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Alpha-released psmslnks.com, some work yet to do. However, started with marketing.&lt;&#x2F;li&gt;
&lt;li&gt;Won a nice domain on Godaddy.com&#x27;s auction. They tricked me to buy another domain similar to that one I won. I didn&#x27;t notice it until it was too late. Godaddy is a scam.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;health&quot;&gt;Health&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;The last month, I have been lifting weights five times a week. Plus three times a week of cardio. Feeling just great.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Updated Sep 14th, 2024&lt;&#x2F;strong&gt;, from my apartment in Stockholm. Probably the last warm days this year. Feel sick.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;reading-5&quot;&gt;Reading&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&quot;Million Dollar Weekend&quot; by Noah Kagan.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;working-1&quot;&gt;Working&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Released shuffle1001albums.com, launched on Producthunt. Gained two real users. Awesome.&lt;&#x2F;li&gt;
&lt;li&gt;Went back to self-hosted Portainer and Docker containers from AWS Amplify.&lt;&#x2F;li&gt;
&lt;li&gt;Testing tips from the &quot;Million Dollar Weekend&quot;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;health-1&quot;&gt;Health&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Completed the &#x27;None2Run&#x27; program from None2run iOS application. It took three months, three times every week. Didn&#x27;t miss one. I am proud of myself. After almost four months of pneumonia I experienced this winter, I am still trying to recover, have no energy, and have issues with breathing (my VO2Max went down to 18). So, these small steps with the cardio program, I hope, will help me to recover&lt;&#x2F;li&gt;
&lt;li&gt;The last month, I have been exercising three times a week - lifting weights. I bought a starter pack from rpstrength.com (by Mike Israetel). It is too early to make any conclusions yet, but I like the training app and program very much&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;updated-july-28th-2024-from-my-apartment-in-stockholm-cloudy-rainy-sideways-sun-very-productive-and-positive&quot;&gt;Updated July 28th, 2024, from my apartment in Stockholm. Cloudy, rainy, sideways sun. Very productive and positive.&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;reading-6&quot;&gt;Reading&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&quot;Personal development for smart people&quot; by Steve Pavlina.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;working-2&quot;&gt;Working&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Started a new project. Very excited.&lt;&#x2F;li&gt;
&lt;li&gt;Tested AWS AMplify with another new project. Also, very excited. Although, so far I think I will host everything on ky own virtual server.&lt;&#x2F;li&gt;
&lt;li&gt;Moved this web log to AWS Amplify&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;health-2&quot;&gt;Health&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Started a helthier diet with Eato iOS application. Very happy with it so far. I like cooking its recipes.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;updated-june-16th-2024-from-my-apartment-in-stockholm-it-s-the-beginning-of-summer-here-cloudy-warm-sideways-rain-very-productive&quot;&gt;Updated June 16th, 2024, from my apartment in Stockholm. It’s the beginning of Summer here. Cloudy, warm, sideways rain. Very productive.&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;reading-7&quot;&gt;Reading&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&quot;Everything is fucked&quot; by Mark Manson.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;working-3&quot;&gt;Working&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Made excellent progress with the bookmarks pet project.&lt;&#x2F;li&gt;
&lt;li&gt;The next project I am going to start with NextJS. The concept of having a separate frontend part in React and a backend part in Rust seems to be an overengineering to me now.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;health-3&quot;&gt;Health&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;I&#x27;m still recovering after the pneumonia I had in winter.&lt;&#x2F;li&gt;
&lt;li&gt;Still recovering after inner ear inflammation.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Brain in a vat</title>
        <published>2025-02-20T00:00:00+00:00</published>
        <updated>2025-02-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mensclara.com/essays/brain-in-a-vat/"/>
        <id>https://mensclara.com/essays/brain-in-a-vat/</id>
        
        <content type="html" xml:base="https://mensclara.com/essays/brain-in-a-vat/">&lt;p&gt;I just started reading a book, &quot;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.amazon.com&#x2F;Consciousness-Explained-Penguin-Science-Dennett-ebook&#x2F;dp&#x2F;B004LLIHIG&#x2F;ref=sr_1_1&quot;&gt;Consciousness explained&lt;&#x2F;a&gt;&quot;, by Daniel C. Dennett; the author discusses hallucinations and possibility of a full symulation of someone&#x27;s brain sensors. This is an old idea, typically called &#x27;brain in a vat&#x27;, and I was familiar with it. But reading its descipion in the book, it restored some old flashbacks in my memory.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Brain_in_a_vat&quot;&gt;Brain in a vat&lt;&#x2F;a&gt; is a well-known thought experiment. A good example of how it could be implemented in the reality is &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.imdb.com&#x2F;title&#x2F;tt0133093&#x2F;&quot;&gt;The Matrix&lt;&#x2F;a&gt; film.&lt;&#x2F;p&gt;
&lt;p&gt;I want to share my personal experience here, since I went through such an experiment in real life.&lt;&#x2F;p&gt;
&lt;p&gt;But at first, this is how Daniel describes the thought experiment:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;They begin with a conveniently comatose brain, kept alive but lacking all input from the optic nerves, the auditory nerves, the somatosensory nerves, and all the other afferent, or input, paths to the brain. It is sometimes assumed that such a &quot;deafferented&quot; would naturally stay in a comatose state forever, needing no morphine to keep it dormant, but there is some empirical evidence to suggest that spontaneous waking might still occur in these dire circumstances. I think we can suppose that were you to awake in such a state, you would find yourself in horrible straits: blind, deaf, completely numb, with no sense of your body&#x27;s orientation.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Sounds horrible. And this is exactly what I experienced some years ago...&lt;&#x2F;p&gt;
&lt;p&gt;I was around 9-12 years old at the time. We with my family lived on a military base near &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Ulan-Ude&quot;&gt;Ulan-Ude&lt;&#x2F;a&gt;. One day, kids from our school were sent to a forest area to play a sort of a military game &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Zarnitsa_(game)&quot;&gt;Zarnitsa&lt;&#x2F;a&gt;. The &quot;game&quot; was very popular at (post-)USSR at those times. In short, this is a set of militarized activities for kids that are happening on an open area, typically somewhere in a forest: throwing dummy grenades, searching for dummy bombs, learning how to handle guns, jogging in &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Gas_mask&quot;&gt;gas masks&lt;&#x2F;a&gt;, etc. The goal was to prepare kids to be soldiers (and one day, die for the country).&lt;&#x2F;p&gt;
&lt;p&gt;The game was typically lasting one whole day from the early morning until the evening.&lt;&#x2F;p&gt;
&lt;p&gt;It was either Spring or Autumn, I do not remember. But the weather was a bit cold.&lt;&#x2F;p&gt;
&lt;p&gt;So, in the middle of the day, at the resting time, I was sitting in a forest on a surface and chatting with other kids. And suddenly everything just disappeared. By saying &#x27;everything&#x27; I mean literally everything. I did not understood what happened, but I suddenly appeared in a complete darkness. No other kids, no light, just complete darkness. I was completely blind. And I was deaf. Just a moment ago I heard other kids, I was talking to them. And now I was completely blind and deaf.&lt;&#x2F;p&gt;
&lt;p&gt;I got horrified. Instinctively, I tried to pop up, but I immideately realized I had no body. Literally, I had no sense of the body. It is not just like when you feel your arm, for example, but can&#x27;t move it. No. I did not feel like I was paralized, it was worse - I did not feel my body, at all: no legs, no hands, no head, no torso, just nothing. My physical body just &quot;disappeared&quot;, completely.&lt;&#x2F;p&gt;
&lt;p&gt;And at this moment I got really panic-stricken. My next instinctive intention was to scream loudly. But I could not. I had no mouth, apparently.&lt;&#x2F;p&gt;
&lt;p&gt;I was blind, deaf, numb, and I had absolutely no sense of my body. Absolute darkness and silense. No orientation. No time. No space. But I was in sonsciousness. Thoughts were running in my head. It was only pure &quot;me&quot; in &quot;nowhere&quot;.&lt;&#x2F;p&gt;
&lt;p&gt;Never in my life, before or after, was I that dread as I was at those moments.&lt;&#x2F;p&gt;
&lt;p&gt;I don&#x27;t know how long this my state lasted. But after a while I got been able to identify some color spots and dimmed light. Then I identified some silhouettes, then very slowly my sight started getting back - I was able to identify people, but the &quot;picture&quot; was heavily distorted; I think, it is called &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Cerebral_polyopia&quot;&gt;polyplopia&lt;&#x2F;a&gt; - when you see 4 or even more pictures of a scene. I still couldn&#x27;t move and hear.&lt;&#x2F;p&gt;
&lt;p&gt;Then, after a while, also very slowly, my body started getting back. It was heavy as the Earth. I barely could move. I barely could control my limbs and body. But now I felt I was material.&lt;&#x2F;p&gt;
&lt;p&gt;I could see (still, with heavy polyplopia), I could feel my body. I found my self lying on the earth and tried to sit up. I could see other kids around me, but still could not hear them.&lt;&#x2F;p&gt;
&lt;p&gt;Yet, after some time, hearing started getting back. At first it was like I was deep under water, but with time it was also recovering.&lt;&#x2F;p&gt;
&lt;p&gt;I don&#x27;t know how much time it took overall, but in the late evening I was sort of OK.&lt;&#x2F;p&gt;
&lt;p&gt;Later, I learned from other kids that something (probably some dummy grenade thrown by someone or launched from some device) hit me directly in my head from the upper back, and it was the thing that organized the &#x27;brain in a vat&#x27; experiemnt for me.&lt;&#x2F;p&gt;
&lt;p&gt;After the accident, for a long time, I had a huge painful hematoma on my head.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Takeaways from Nomad Capitalist by Andrew Henderson</title>
        <published>2025-02-16T00:00:00+00:00</published>
        <updated>2025-02-16T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mensclara.com/essays/book-nomad-capitalist/"/>
        <id>https://mensclara.com/essays/book-nomad-capitalist/</id>
        
        <content type="html" xml:base="https://mensclara.com/essays/book-nomad-capitalist/">&lt;p&gt;This is not a book with ready-to-use solutions. It is mostly about ideas and mindset. Many thoughts in the book are relevant and&#x2F;or specific only for US citizens&#x2F;residents. Some of the information is obviously outdated, but the author also often says this directly.&lt;&#x2F;p&gt;
&lt;p&gt;Andrew mentions russia and belorus as examples of emerging markets with huge potential. I don&#x27;t know how close did he look at these countries, but this is absolutely insane. Both countries is a great example of failed states and thirany, not of emerging markets. If you don&#x27;t know, russia is a world terrorist, and belorus is de-facto under full control of russia.&lt;&#x2F;p&gt;
&lt;p&gt;Similar issue is with Andrew&#x27;s view on Georgia. I agree with the thought that the country had a chance to become a great example of a miraculous tranformation from a place where you would not want to keep your money into a leader in the region. Alas, in the last recent years they chose to go the &#x27;russian way&#x27; and so Georgia is not a miracle anymore but a very risky country to deal with.&lt;&#x2F;p&gt;
&lt;p&gt;Other than that, I recommend this book to read to anyone who is interested in &#x27;nomad capitalism&#x27;.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Do not be a slave. Do not do what everyone else does. Focus on thriving, not on surviving. Work on the edges. Freedom to decide whether to stay or to go&lt;&#x2F;li&gt;
&lt;li&gt;In a &#x27;fight or flight&#x27; situation, &#x27;to flight&#x27;, probably, is the best solution. No reason to stay at your home country if you feel bad there&lt;&#x2F;li&gt;
&lt;li&gt;Nomad is a lifestyle. Freedom to choose&lt;&#x2F;li&gt;
&lt;li&gt;When it is get too cold at the north, many birds fly to the south. There is no duty to stay where you feel badly just because you were born there&lt;&#x2F;li&gt;
&lt;li&gt;Walking in the right direction is more important than arriving somewhere&lt;&#x2F;li&gt;
&lt;li&gt;You don&#x27;t have to stay somewhere just because your parents are from there&lt;&#x2F;li&gt;
&lt;li&gt;Go where you&#x27;re treated best&lt;&#x2F;li&gt;
&lt;li&gt;There are best places in the world to park your cash. Yet, few people use these places. The reason is a functional habit: we are conditioned to go where we are familiar, not where we are treated best&lt;&#x2F;li&gt;
&lt;li&gt;Singapore may be a good place to keep your money, but not the best place to live&lt;&#x2F;li&gt;
&lt;li&gt;Many people live by notion that being a patriot, loyal to their country, to the government, is the most noble purpose and must be defended at all costs&lt;&#x2F;li&gt;
&lt;li&gt;Fight for yourself. Vote with your feet. Go where you&#x27;re treated best&lt;&#x2F;li&gt;
&lt;li&gt;Have a citizenship somewhere that does not tax income earned outside the country&lt;&#x2F;li&gt;
&lt;li&gt;Have buinesses and investments in stable, low- or no-tax countries&lt;&#x2F;li&gt;
&lt;li&gt;Live as a tourist in countries that support your valules, rather than society&#x27;s&lt;&#x2F;li&gt;
&lt;li&gt;Many countries reserve their best treatment for tourists: e.g. unlike a resident or a citizen, a tourist probably won&#x27;t be chased by police for something minor (like jaywalking)&lt;&#x2F;li&gt;
&lt;li&gt;Overcome irrelevant fear. Imagine the worst case scenario before taking an action. Yet, worst case scenarios are unlikely to occur. With diversifying and internationalization, the risks are actually lower&lt;&#x2F;li&gt;
&lt;li&gt;If you can move to Vegas, you can move to Panama&lt;&#x2F;li&gt;
&lt;li&gt;Run toward something, not from something&lt;&#x2F;li&gt;
&lt;li&gt;One of the biggest mistakes, is to do somethign because of getting angry (on government, taxes, society, etc.)&lt;&#x2F;li&gt;
&lt;li&gt;You only have to do a very few things right in your life so long as you don&#x27;t do too many things wrong&lt;&#x2F;li&gt;
&lt;li&gt;Giving yourself opportunities is more important than your current physical location. Long-term mindset will pay off down the road&lt;&#x2F;li&gt;
&lt;li&gt;One of the best things in nomad capitalist life style is low commitment to any one place. Being uncommited geographycally, does not mean you cannot commit to other things you care about&lt;&#x2F;li&gt;
&lt;li&gt;All the things you enjoy at home (Uber, 24-hour convenient stoes, shopping) will probably be available wherever you choose to move&lt;&#x2F;li&gt;
&lt;li&gt;With only one passport, there is only one country that &quot;owns&quot; you. You are very limited in protecting yourself in weird situations. With more than one passports you have more options&lt;&#x2F;li&gt;
&lt;li&gt;Thailand and Malaysia are two of the best in health care. Many other countries are getting into medical tourism too. Singapore is known for excellent quality cancer care. Brazil is known for cosmetical procedures. India has two of the ten best hospitals on the planet. Asian Hearth Institute in Mumbai frequently performs among the most complicate cardiology procedures in the world and boasts the lowest hearth surgery mortality rate at just 0.26%. Romania and Serbia good in dental&lt;&#x2F;li&gt;
&lt;li&gt;Top ten hospitals for medical tourism are in Malaysia, Germany, Lebanon, India, South Korea, Thailand, Turkey, Singapore&lt;&#x2F;li&gt;
&lt;li&gt;It&#x27;s not worth to keep your money in Panama, Belize, other small island countries. USA, easily can affect their policy via sanctions and regulations, and they won&#x27;t be able to protect your assets&lt;&#x2F;li&gt;
&lt;li&gt;Do not deal with banks in Cyprus or Ukraine. Old offshore world banks of Switzerland, Liechtenstein, Luxembourg, for most individuals no longer offer the perfect panacea for offshore banking&lt;&#x2F;li&gt;
&lt;li&gt;The worst offshore bank is HSBC&lt;&#x2F;li&gt;
&lt;li&gt;Hong Kong banks are good to work with. But they have so many Chinese billioners among their clients, so they are not interested in your $100,000 anymore&lt;&#x2F;li&gt;
&lt;li&gt;Hong Kong does not need you. Switzerland cannot take you. Tiny little islands are harrased (by the West) and unsafe (for banking). So, focus on the middle, on something Singapore and Hong Kong were 20 years ago&lt;&#x2F;li&gt;
&lt;li&gt;Some countries do not want foreigner&#x27;s money. Their banks might be happy to work with you, but their central banks make it just impossible&lt;&#x2F;li&gt;
&lt;li&gt;It is not worth to deal with Carribean (and other distinctly offshore) banks. You easily might pay hundreds of dollars for every transaction&lt;&#x2F;li&gt;
&lt;li&gt;Properly organized, Delawer can be a tax heaven. Just not for people living in USA&lt;&#x2F;li&gt;
&lt;li&gt;Setup your company in one country where you earn money and then establish your personal tax residence in the territorial tax country. Teritorial tax countries include places as: Malaysia, Thailand, Georgia, Singapore, Hong Kong, Panama, Costa Rica, and others&lt;&#x2F;li&gt;
&lt;li&gt;Uruguay and Portugal offer tax exemptions for certain types of income for new residents&lt;&#x2F;li&gt;
&lt;li&gt;Gold and Silver are most widely traded. Usually come with the lowest spread if purchased correctly, this makes them better than Platinum and Palladium if your goal is preserving liquid wealth&lt;&#x2F;li&gt;
&lt;li&gt;Buy gold bars, small enough that you can sell only a part of your lot if you need to. Hundred-gram bars are good. You should own them physically. Your goal is to obtain segregated, allocated storage of the metals you own, not just a piece of someone else&#x27;s pie. Avoid bank safe deposit boxes, as these require form filling by the taxman and have little protection if your bank has a problem&lt;&#x2F;li&gt;
&lt;li&gt;The best place to store your gold is in a private offshore vault. Singapore is among the best places to store gold, but it is not perfect and not for everyone&lt;&#x2F;li&gt;
&lt;li&gt;Countries might have special regulations related to physical bars of metal. Double check if you are going to move physical gold bars via border between countries - there might be limitations, tax challenges, etc.&lt;&#x2F;li&gt;
&lt;li&gt;Probably, the best place to store gold in Europe is Austria&lt;&#x2F;li&gt;
&lt;li&gt;Owning a raw land is another way to diversify your wealth. It can be an excellent alternative to keeping money in a bank&lt;&#x2F;li&gt;
&lt;li&gt;Cryptocurrencies is not the best choice. But it is better rather deversify (even using crypto) than trust everything to a government&lt;&#x2F;li&gt;
&lt;li&gt;In the past several years, more than half of all existing Bitcoins were not used in a single transaction&lt;&#x2F;li&gt;
&lt;li&gt;Many countries have special regulations and rules related to cryptocurrencies&lt;&#x2F;li&gt;
&lt;li&gt;When it is no longer risky, it is too late&lt;&#x2F;li&gt;
&lt;li&gt;Do not waste your time trying to convience the indoctrinated that there is a different way to do things. You are not going to change the world. You have a big enough job to change yourself.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>On AI</title>
        <published>2025-02-09T00:00:00+00:00</published>
        <updated>2025-02-09T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mensclara.com/essays/on-ai/"/>
        <id>https://mensclara.com/essays/on-ai/</id>
        
        <content type="html" xml:base="https://mensclara.com/essays/on-ai/">&lt;p&gt;I remember the times when C++ was the only &quot;serious&quot; language that was used to write software. There also things like Tcl&#x2F;Tk and Perl. But only C++ was considered the true language that had the potential to take over teh future.&lt;&#x2F;p&gt;
&lt;p&gt;Then, Java appeared. I remember that magazines were split on two sides: one side was saying that Java is the language of the future, and the other side was saying that Java is not a real language, and C++ will still be the best.&lt;&#x2F;p&gt;
&lt;p&gt;Yet, Java needed to be compiled and demanded a lot of memory and CPU power.&lt;&#x2F;p&gt;
&lt;p&gt;My first IDE was Borland Turbo Pascal, and then Borlan Turbo C. I think, Java was that language that started to change the IDE world. NetBeans probably was the first &quot;true&quot; IDE in the meaning we understand it today.&lt;&#x2F;p&gt;
&lt;p&gt;I remember there were holywars regarding whether it was &quot;normal&quot; for a &quot;real&quot; developer to use IDEs. Many people who claimed themselves to be professional developers were against using IDEs. And those who worked with IDEs were often considered as &quot;not real&quot; developers.&lt;&#x2F;p&gt;
&lt;p&gt;Although, with time, the &quot;professional programmers&quot; slowly started to accept IDE concept, equiping their &quot;Notepads&quot; with plugins and extensions, making their them more like IDEs.&lt;&#x2F;p&gt;
&lt;p&gt;Then the autocompletion appeared. Now you could not only organize your code but also write it faster, and you also had refactoring mechanisms (like renaming variables). What happened next? Well, you can guess it. New holywars started: &quot;real programmers do not use autocompletion&quot;. Like if you need autocompletion, you do not know the language well enough.&lt;&#x2F;p&gt;
&lt;p&gt;And again, many people were exhibiting their skills by writing code in Midnight Commander, and they considered IDEs and autocompletion as a sign of the degradation of the developer&#x27;s skills and the industry.&lt;&#x2F;p&gt;
&lt;p&gt;When the first GPTs appeared, the were not that good at writing texts and code as they are now. But anyway that was impressive. And for sure, new holywars started: &quot;real programmers do not use AI&quot;.&lt;&#x2F;p&gt;
&lt;p&gt;Now we have AI models that are very good (sometimes, fantastically good) at writing code and solving real problems. Noone making holywars anymore about IDEs and autocompletion, even &quot;professional programmers&quot; are using them on the daily basis.&lt;&#x2F;p&gt;
&lt;p&gt;I believe, this is a new era. We just should accept it. AI is the new &quot;autocompletion&quot;: at first &quot;real developers do not use it&quot;, but very soon it is just a normal part of life.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>I have completed none2run training plan</title>
        <published>2024-09-22T00:00:00+00:00</published>
        <updated>2024-09-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://mensclara.com/essays/none2run/"/>
        <id>https://mensclara.com/essays/none2run/</id>
        
        <summary type="html">&lt;p&gt;Last winter, I had pneumonia for around four months. That was a sort of a disaster for my health: I could not sleep because of the coughing, and I had issues with breathing. But even after it ended, I still experienced consequences - e.g., my &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;VO2_max&quot;&gt;VO2max&lt;&#x2F;a&gt; metric dropped to 18.&lt;&#x2F;p&gt;</summary>
        
    </entry>
</feed>
