<?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>int-to-roman &#8211; JSAlgorithm</title>
	<atom:link href="https://jsalgorithm.com/tag/int-to-roman/feed/" rel="self" type="application/rss+xml" />
	<link>https://jsalgorithm.com</link>
	<description></description>
	<lastBuildDate>Tue, 12 May 2020 11:50:45 +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>Int to Roman</title>
		<link>https://jsalgorithm.com/2020/05/12/int-to-roman/</link>
					<comments>https://jsalgorithm.com/2020/05/12/int-to-roman/#respond</comments>
		
		<dc:creator><![CDATA[Ron]]></dc:creator>
		<pubDate>Tue, 12 May 2020 11:50:45 +0000</pubDate>
				<category><![CDATA[Leetcode]]></category>
		<category><![CDATA[String]]></category>
		<category><![CDATA[int-to-roman]]></category>
		<category><![CDATA[leetcode]]></category>
		<category><![CDATA[string]]></category>
		<guid isPermaLink="false">http://50.19.13.106/?p=34</guid>

					<description><![CDATA[let intToRoman = function(num) { const mapping = { 1000: 'M', 900: 'CM', 500: 'D', 400: 'CD', 100: 'C', 90: 'XC', 50: 'L', 40: 'XL', 10: 'X', 9: 'IX', 5: 'V', 4: 'IV', 1: 'I' } let result = ""; for(let divisor of [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, [&#8230;]]]></description>
										<content:encoded><![CDATA[
<pre class="wp-block-preformatted">let intToRoman = function(num) {

    const mapping = {
        1000: 'M',
        900:  'CM',
        500:  'D',
        400:  'CD',
        100:  'C',
        90:   'XC',
        50:   'L',
        40:   'XL',
        10:   'X',
        9:    'IX',
        5:    'V',
        4:    'IV',
        1:    'I'
    }

    let result = "";
    for(let divisor of [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]) {
        if (num >= divisor) {
            let quotient = <strong><em>Math</em></strong>.floor(num / divisor);
            result = result + mapping[divisor].repeat(quotient);
            num = num % divisor;
        }
    }

    return result;
}</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://jsalgorithm.com/2020/05/12/int-to-roman/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">34</post-id>	</item>
	</channel>
</rss>
