<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://paste.voklen.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Admin</id>
	<title>PASTE Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://paste.voklen.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Admin"/>
	<link rel="alternate" type="text/html" href="https://paste.voklen.com/wiki/Special:Contributions/Admin"/>
	<updated>2026-04-08T15:10:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://paste.voklen.com/w/index.php?title=Binary_search&amp;diff=4</id>
		<title>Binary search</title>
		<link rel="alternate" type="text/html" href="https://paste.voklen.com/w/index.php?title=Binary_search&amp;diff=4"/>
		<updated>2026-01-04T11:08:42Z</updated>

		<summary type="html">&lt;p&gt;Admin: Add syntax highlighting to code example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Binary search is a search algorithm to find a value in a sorted array. It works by starting at the middle of the array and checking if the target value is higher or lower than the middle value. If it is lower, the algorithm then treats the bottom half as the new array and repeats the process of checking the middle value until the target value is found. If the target is higher than the midpoint, the top half of the array is used.&lt;br /&gt;
&lt;br /&gt;
Example in Python:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python3&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
def binary_search(array, target):&lt;br /&gt;
    min = 0&lt;br /&gt;
    max = len(array)&lt;br /&gt;
    while min &amp;lt;= max:&lt;br /&gt;
        mid = (min + max) // 2&lt;br /&gt;
        if array[mid] &amp;lt; target:&lt;br /&gt;
            min = mid + 1&lt;br /&gt;
        elif array[mid] &amp;gt; target:&lt;br /&gt;
            max = mid - 1&lt;br /&gt;
        else:&lt;br /&gt;
            return mid&lt;br /&gt;
    # Not found&lt;br /&gt;
    return -1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://paste.voklen.com/w/index.php?title=Binary_search&amp;diff=3</id>
		<title>Binary search</title>
		<link rel="alternate" type="text/html" href="https://paste.voklen.com/w/index.php?title=Binary_search&amp;diff=3"/>
		<updated>2026-01-04T10:57:58Z</updated>

		<summary type="html">&lt;p&gt;Admin: Create binary search page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Binary search is a search algorithm to find a value in a sorted array. It works by starting at the middle of the array and checking if the target value is higher or lower than the middle value. If it is lower, the algorithm then treats the bottom half as the new array and repeats the process of checking the middle value until the target value is found. If the target is higher than the midpoint, the top half of the array is used.&lt;br /&gt;
&lt;br /&gt;
Example in Python:&lt;br /&gt;
&lt;br /&gt;
 def binary_search(array, target):&lt;br /&gt;
     min = 0&lt;br /&gt;
     max = len(array)&lt;br /&gt;
     while min &amp;lt;= max:&lt;br /&gt;
         mid = (min + max) // 2&lt;br /&gt;
         if array[mid] &amp;lt; target:&lt;br /&gt;
             min = mid + 1&lt;br /&gt;
         elif array[mid] &amp;gt; target:&lt;br /&gt;
             max = mid - 1&lt;br /&gt;
         else:&lt;br /&gt;
             return mid&lt;br /&gt;
     # Not found&lt;br /&gt;
     return -1&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://paste.voklen.com/w/index.php?title=Main_Page&amp;diff=2</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://paste.voklen.com/w/index.php?title=Main_Page&amp;diff=2"/>
		<updated>2026-01-04T10:25:03Z</updated>

		<summary type="html">&lt;p&gt;Admin: Initial commit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the PASTE Wiki! The PASTE stands for Patterns, Algorithms, Solutions, Techniques, and Examples (inspired by [https://news.ycombinator.com/item?id=46485818 this HN comment]) and it&#039;s goal is to collect the world&#039;s knowledge of all things programming related. This Wiki is very new so please feel free to add new pages.&lt;br /&gt;
&lt;br /&gt;
=== How is this different from [https://www.wikifunctions.org/wiki/Wikifunctions:Main_Page Wikifunctions]? ===&lt;br /&gt;
While Wikifunctions is:&amp;lt;blockquote&amp;gt;A library of code functions to support the Wikimedia projects and beyond, in the world&#039;s natural and programming languages.[https://www.wikifunctions.org/wiki/Wikifunctions:Main_Page]&amp;lt;/blockquote&amp;gt;The PASTE Wiki aims to be a more general resource, which can be anything from &amp;quot;This is how Dijkstra&#039;s Algorithm works&amp;quot; to &amp;quot;Why logging is important and how to do it&amp;quot; to &amp;quot;These are the tradeoffs of using different databases&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>