<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>sorts &#8211; JSAlgorithm</title>
	<atom:link href="https://jsalgorithm.com/tag/sorts/feed/" rel="self" type="application/rss+xml" />
	<link>https://jsalgorithm.com</link>
	<description></description>
	<lastBuildDate>Thu, 14 May 2020 03:13:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.15</generator>
<site xmlns="com-wordpress:feed-additions:1">177240629</site>	<item>
		<title>Search Suggestion System (Simple)</title>
		<link>https://jsalgorithm.com/2020/05/14/search-suggestion-system-simple/</link>
					<comments>https://jsalgorithm.com/2020/05/14/search-suggestion-system-simple/#respond</comments>
		
		<dc:creator><![CDATA[Ronald]]></dc:creator>
		<pubDate>Thu, 14 May 2020 03:13:57 +0000</pubDate>
				<category><![CDATA[Array]]></category>
		<category><![CDATA[Leetcode]]></category>
		<category><![CDATA[Sort]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[leetcode]]></category>
		<category><![CDATA[sorts]]></category>
		<guid isPermaLink="false">http://50.19.13.106/?p=70</guid>

					<description><![CDATA[let suggestedProducts = function(products, searchWord) { products.sort(); let result = []; for(let i = 0; i &#60; searchWord.length; i++) { products = products.filter(p =&#62; p[i] === searchWord[i]); result.push(products.slice(0, Math.min(3, products.length))); } return result; //?};]]></description>
										<content:encoded><![CDATA[
<pre class="wp-block-preformatted">let suggestedProducts = function(products, searchWord) {<br>    products.sort();<br><br>    let result = [];<br>    for(let i = 0; i &lt; searchWord.length; i++) {<br>        products = products.filter(p =&gt; p[i] === searchWord[i]);<br>        result.push(products.slice(0, <strong><em>Math</em></strong>.min(3, products.length)));<br>    }<br><br>    return result; //?<br>};</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://jsalgorithm.com/2020/05/14/search-suggestion-system-simple/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">70</post-id>	</item>
		<item>
		<title>Merge Sort</title>
		<link>https://jsalgorithm.com/2020/05/12/merge-sort/</link>
					<comments>https://jsalgorithm.com/2020/05/12/merge-sort/#respond</comments>
		
		<dc:creator><![CDATA[Ron]]></dc:creator>
		<pubDate>Tue, 12 May 2020 00:09:39 +0000</pubDate>
				<category><![CDATA[Recursion]]></category>
		<category><![CDATA[Sort]]></category>
		<category><![CDATA[mergesort]]></category>
		<category><![CDATA[recursion]]></category>
		<category><![CDATA[sorts]]></category>
		<guid isPermaLink="false">http://50.19.13.106/?p=30</guid>

					<description><![CDATA[let mergeSort = function(numbers) { function mergeSort(arr) { if (arr.length === 1) return arr; let center = Math.floor(arr.length / 2); let left = arr.slice(0, center); let right = arr.slice(center); return merge(mergeSort(left), mergeSort(right)); } function merge(left, right) { let results = []; while (left.length &#38;&#38; right.length) { if (left[0] &#60; right[0]) { results.push(left.shift()); } else { [&#8230;]]]></description>
										<content:encoded><![CDATA[
<pre class="wp-block-preformatted">let mergeSort = function(numbers) {

    function mergeSort(arr) {
        if (arr.length === 1) return arr;
        let center = <strong><em>Math</em></strong>.floor(arr.length / 2);
        let left = arr.slice(0, center);
        let right = arr.slice(center);
        return merge(mergeSort(left), mergeSort(right));
    }
    
    function merge(left, right) {
        let results = [];
        while (left.length &amp;&amp; right.length) {
            if (left[0] &lt; right[0]) {
                results.push(left.shift());
            }
            else {
                results.push(right.shift());
            }
        }

        return [...results, ...left, ...right];
    }

    return mergeSort(numbers);
}</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://jsalgorithm.com/2020/05/12/merge-sort/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">30</post-id>	</item>
	</channel>
</rss>
