You are on page 1of 54

<!DOCTYPE html> <!-- saved from url=(0065)http://ibanta.blogspot.in/2012/02/codility-demo-soluti on-100.

html --> <html b:version="2" class="v2" dir="ltr"><head><meta http-equiv="Content-Type" c ontent="text/html; charset=UTF-8"> <meta content="width=1100" name="viewport"> <script src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/cb=gapi.lo aded_1" async=""></script><script src="./IBanta.Blogspot.com Codility Demo Solu tion 100%_files/cb=gapi.loaded_0" async=""></script><script type="text/javascrip t">(function() { var b=window,e="jstiming",g="tick";(function(){function d(a){th is.t={};this.tick=function(a,d,c){c=void 0!=c?c:(new Date).getTime();this.t[a]=[ c,d]};this[g]("start",null,a)}var a=new d;b.jstiming={Timer:d,load:a};if(b.perfo rmance&&b.performance.timing){var a=b.performance.timing,c=b[e].load,f=a.navigat ionStart,a=a.responseStart;0<f&&a>=f&&(c[g]("_wtsrt",void 0,f),c[g]("wtsrt_","_w tsrt",a),c[g]("tbsd_","wtsrt_"))}try{a=null,b.chrome&&b.chrome.csi&&(a=Math.floo r(b.chrome.csi().pageT),c&&0<f&&(c[g]("_tbnd",void 0,b.chrome.csi().startE), c[g]("tbnd_","_tbnd",f))),null==a&&b.gtbExternal&&(a=b.gtbExternal.pageT()),null ==a&&b.external&&(a=b.external.pageT,c&&0<f&&(c[g]("_tbnd",void 0,b.external.sta rtE),c[g]("tbnd_","_tbnd",f))),a&&(b[e].pt=a)}catch(l){}})();b.tickAboveFold=fun ction(d){var a=0;if(d.offsetParent){do a+=d.offsetTop;while(d=d.offsetParent)}d= a;750>=d&&b[e].load[g]("aft")};var h=!1;function k(){h||(h=!0,b[e].load[g]("firs tScrollTime"))}b.addEventListener?b.addEventListener("scroll",k,!1):b.attachEven t("onscroll",k); })();</script> <meta content="blogger" name="generator"> <link href="http://ibanta.blogspot.in/favicon.ico" rel="icon" type="image/x-icon "> <link href="http://ibanta.blogspot.com/2012/02/codility-demo-solution-100.html" rel="canonical"> <link rel="alternate" type="application/atom+xml" title="IBanta.Blogspot.com - A tom" href="http://ibanta.blogspot.com/feeds/posts/default"> <link rel="alternate" type="application/rss+xml" title="IBanta.Blogspot.com - RS S" href="http://ibanta.blogspot.com/feeds/posts/default?alt=rss"> <link rel="service.post" type="application/atom+xml" title="IBanta.Blogspot.com - Atom" href="http://www.blogger.com/feeds/1891650649212550830/posts/default"> <link rel="alternate" type="application/atom+xml" title="IBanta.Blogspot.com - A tom" href="http://ibanta.blogspot.com/feeds/377012569112191370/comments/default" > <!--[if IE]><script type="text/javascript" src="//www.blogger.com/static/v1/jsbi n/4041843765-ieretrofit.js"></script> <![endif]--> <!--[if IE]> <script> (function() { var html5 = ("abbr,article,aside,audio,canva s,datalist,details," + "figure,footer,header,hgroup,mark,menu,meter,nav,output," + "progress,section,time,video").split(','); for (var i = 0; i < html5.length; i++) { document.createElement(html5[i]); } try { document.execCommand('Backgroun dImageCache', false, true); } catch(e) {} })(); </script> <![endif]--> <title>IBanta.Blogspot.com: Codility Demo Solution 100%</title> <link type="text/css" rel="stylesheet" href="./IBanta.Blogspot.com Codility Dem o Solution 100%_files/2159474849-widget_css_2_bundle.css"> <link type="text/css" rel="stylesheet" href="./IBanta.Blogspot.com Codility Dem o Solution 100%_files/gsearch.css"> <link type="text/css" rel="stylesheet" href="./IBanta.Blogspot.com Codility Dem o Solution 100%_files/authorization.css"> <link type="text/css" rel="stylesheet" href="./IBanta.Blogspot.com Codility Dem o Solution 100%_files/authorization.css"> <style id="page-skin-1" type="text/css"><!-/* -----------------------------------------------

Blogger Template Style Name: Simple Designer: Josh Peterson URL: www.noaesthetic.com ----------------------------------------------- */ /* Variable definitions ==================== <Variable name="keycolor" description="Main Color" type="color" default="#66bbdd "/> <Group description="Page Text" selector="body"> <Variable name="body.font" description="Font" type="font" default="normal normal 12px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/> <Variable name="body.text.color" description="Text Color" type="color" default=" #222222"/> </Group> <Group description="Backgrounds" selector=".body-fauxcolumns-outer"> <Variable name="body.background.color" description="Outer Background" type="colo r" default="#66bbdd"/> <Variable name="content.background.color" description="Main Background" type="co lor" default="#ffffff"/> <Variable name="header.background.color" description="Header Background" type="c olor" default="transparent"/> </Group> <Group description="Links" selector=".main-outer"> <Variable name="link.color" description="Link Color" type="color" default="#2288 bb"/> <Variable name="link.visited.color" description="Visited Color" type="color" def ault="#888888"/> <Variable name="link.hover.color" description="Hover Color" type="color" default ="#33aaff"/> </Group> <Group description="Blog Title" selector=".header h1"> <Variable name="header.font" description="Font" type="font" default="normal normal 60px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/> <Variable name="header.text.color" description="Title Color" type="color" defaul t="#3399bb" /> </Group> <Group description="Blog Description" selector=".header .description"> <Variable name="description.text.color" description="Description Color" type="co lor" default="#777777" /> </Group> <Group description="Tabs Text" selector=".tabs-inner .widget li a"> <Variable name="tabs.font" description="Font" type="font" default="normal normal 14px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/> <Variable name="tabs.text.color" description="Text Color" type="color" default=" #999999"/> <Variable name="tabs.selected.text.color" description="Selected Color" type="col or" default="#000000"/> </Group> <Group description="Tabs Background" selector=".tabs-outer .PageList"> <Variable name="tabs.background.color" description="Background Color" type="colo r" default="#f5f5f5"/> <Variable name="tabs.selected.background.color" description="Selected Color" typ e="color" default="#eeeeee"/> </Group> <Group description="Post Title" selector="h3.post-title, .comments h4"> <Variable name="post.title.font" description="Font" type="font" default="normal normal 22px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/> </Group>

<Group description="Date Header" selector=".date-header"> <Variable name="date.header.color" description="Text Color" type="color" default="#222222"/> <Variable name="date.header.background.color" description="Background Color" typ e="color" default="transparent"/> </Group> <Group description="Post Footer" selector=".post-footer"> <Variable name="post.footer.text.color" description="Text Color" type="color" de fault="#666666"/> <Variable name="post.footer.background.color" description="Background Color" typ e="color" default="#f9f9f9"/> <Variable name="post.footer.border.color" description="Shadow Color" type="color " default="#eeeeee"/> </Group> <Group description="Gadgets" selector="h2"> <Variable name="widget.title.font" description="Title Font" type="font" default="normal bold 11px Arial, Tahoma, Helvetica, FreeSans, sans-serif"/> <Variable name="widget.title.text.color" description="Title Color" type="color" default="#000000"/> <Variable name="widget.alternate.text.color" description="Alternate Color" type= "color" default="#999999"/> </Group> <Group description="Images" selector=".main-inner"> <Variable name="image.background.color" description="Background Color" type="col or" default="#ffffff"/> <Variable name="image.border.color" description="Border Color" type="color" defa ult="#eeeeee"/> <Variable name="image.text.color" description="Caption Text Color" type="color" default="#222222"/> </Group> <Group description="Accents" selector=".content-inner"> <Variable name="body.rule.color" description="Separator Line Color" type="color" default="#eeeeee"/> <Variable name="tabs.border.color" description="Tabs Border Color" type="color" default="#eeeeee"/> </Group> <Variable name="body.background" description="Body Background" type="background" color="#66bbdd" default="$(color) none repeat scroll top left"/> <Variable name="body.background.override" description="Body Background Override" type="string" default=""/> <Variable name="body.background.gradient.cap" description="Body Gradient Cap" ty pe="url" default="url(//www.blogblog.com/1kt/simple/gradients_light.png)"/> <Variable name="body.background.gradient.tile" description="Body Gradient Tile" type="url" default="url(//www.blogblog.com/1kt/simple/body_gradient_tile_light.png)"/> <Variable name="content.background.color.selector" description="Content Backgrou nd Color Selector" type="string" default=".content-inner"/> <Variable name="content.padding" description="Content Padding" type="length" def ault="10px"/> <Variable name="content.padding.horizontal" description="Content Horizontal Padd ing" type="length" default="10px"/> <Variable name="content.shadow.spread" description="Content Shadow Spread" type= "length" default="40px"/> <Variable name="content.shadow.spread.webkit" description="Content Shadow Spread (WebKit)" type="length" default="5px"/> <Variable name="content.shadow.spread.ie" description="Content Shadow Spread (IE )" type="length" default="10px"/>

<Variable name="main.border.width" description="Main Border Width" type="length" default="0"/> <Variable name="header.background.gradient" description="Header Gradient" type=" url" default="none"/> <Variable name="header.shadow.offset.left" description="Header Shadow Offset Lef t" type="length" default="-1px"/> <Variable name="header.shadow.offset.top" description="Header Shadow Offset Top" type="length" default="-1px"/> <Variable name="header.shadow.spread" description="Header Shadow Spread" type="l ength" default="1px"/> <Variable name="header.padding" description="Header Padding" type="length" defau lt="30px"/> <Variable name="header.border.size" description="Header Border Size" type="lengt h" default="1px"/> <Variable name="header.bottom.border.size" description="Header Bottom Border Siz e" type="length" default="1px"/> <Variable name="header.border.horizontalsize" description="Header Horizontal Bor der Size" type="length" default="0"/> <Variable name="description.text.size" description="Description Text Size" type= "string" default="140%"/> <Variable name="tabs.margin.top" description="Tabs Margin Top" type="length" def ault="0" /> <Variable name="tabs.margin.side" description="Tabs Side Margin" type="length" d efault="30px" /> <Variable name="tabs.background.gradient" description="Tabs Background Gradient" type="url" default="url(//www.blogblog.com/1kt/simple/gradients_light.png)"/> <Variable name="tabs.border.width" description="Tabs Border Width" type="length" default="1px"/> <Variable name="tabs.bevel.border.width" description="Tabs Bevel Border Width" t ype="length" default="1px"/> <Variable name="date.header.padding" description="Date Header Padding" type="str ing" default="inherit"/> <Variable name="date.header.letterspacing" description="Date Header Letter Spaci ng" type="string" default="inherit"/> <Variable name="date.header.margin" description="Date Header Margin" type="strin g" default="inherit"/> <Variable name="post.margin.bottom" description="Post Bottom Margin" type="lengt h" default="25px"/> <Variable name="image.border.small.size" description="Image Border Small Size" t ype="length" default="2px"/> <Variable name="image.border.large.size" description="Image Border Large Size" t ype="length" default="5px"/> <Variable name="page.width.selector" description="Page Width Selector" type="str ing" default=".region-inner"/> <Variable name="page.width" description="Page Width" type="string" default="auto "/> <Variable name="main.section.margin" description="Main Section Margin" type="len gth" default="15px"/> <Variable name="main.padding" description="Main Padding" type="length" default=" 15px"/> <Variable name="main.padding.top" description="Main Padding Top" type="length" d efault="30px"/> <Variable name="main.padding.bottom" description="Main Padding Bottom" type="len gth" default="30px"/> <Variable name="paging.background" color="#ffffff" description="Background of blog paging area" type="background" default="transparent none no-repeat scroll top center"/> <Variable name="footer.bevel" description="Bevel border length of footer" type="

length" default="0"/> <Variable name="mobile.background.overlay" description="Mobile Background Overla y" type="string" default="transparent none repeat scroll top left"/> <Variable name="mobile.background.size" description="Mobile Background Size" typ e="string" default="auto"/> <Variable name="mobile.button.color" description="Mobile Button Color" type="col or" default="#ffffff" /> <Variable name="startSide" description="Side where text starts in blog language" type="automatic" default="left"/> <Variable name="endSide" description="Side where text ends in blog language" typ e="automatic" default="right"/> */ /* Content ----------------------------------------------- */ body { font: normal normal 12px Arial, Tahoma, Helvetica, FreeSans, sans-serif; color: #222222; background: #66bbdd none repeat scroll top left; padding: 0 40px 40px 40px; } html body .region-inner { min-width: 0; max-width: 100%; width: auto; } a:link { text-decoration:none; color: #2288bb; } a:visited { text-decoration:none; color: #888888; } a:hover { text-decoration:underline; color: #33aaff; } .body-fauxcolumn-outer .fauxcolumn-inner { background: transparent url(//www.blogblog.com/1kt/simple/body_gradient_tile_lig ht.png) repeat scroll top left; _background-image: none; } .body-fauxcolumn-outer .cap-top { position: absolute; z-index: 1; height: 400px; width: 100%; background: #66bbdd none repeat scroll top left; } .body-fauxcolumn-outer .cap-top .cap-left { width: 100%; background: transparent url(//www.blogblog.com/1kt/simple/gradients_light.png) r epeat-x scroll top left; _background-image: none; } .content-outer { -moz-box-shadow: 0 0 40px rgba(0, 0, 0, .15); -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .15); -goog-ms-box-shadow: 0 0 10px #333333;

box-shadow: 0 0 40px rgba(0, 0, 0, .15); margin-bottom: 1px; } .content-inner { padding: 10px 10px; } .content-inner { background-color: #ffffff; } /* Header ----------------------------------------------- */ .header-outer { background: transparent none repeat-x scroll 0 -400px; _background-image: none; } .Header h1 { font: normal normal 60px Arial, Tahoma, Helvetica, FreeSans, sans-serif; color: #3399bb; text-shadow: -1px -1px 1px rgba(0, 0, 0, .2); } .Header h1 a { color: #3399bb; } .Header .description { font-size: 140%; color: #777777; } .header-inner .Header .titlewrapper { padding: 22px 30px; } .header-inner .Header .descriptionwrapper { padding: 0 30px; } /* Tabs ----------------------------------------------- */ .tabs-inner .section:first-child { border-top: 1px solid #eeeeee; } .tabs-inner .section:first-child ul { margin-top: -1px; border-top: 1px solid #eeeeee; border-left: 0 solid #eeeeee; border-right: 0 solid #eeeeee; } .tabs-inner .widget ul { background: #f5f5f5 url(//www.blogblog.com/1kt/simple/gradients_light.png) repea t-x scroll 0 -800px; _background-image: none; border-bottom: 1px solid #eeeeee; margin-top: 0; margin-left: -30px; margin-right: -30px; } .tabs-inner .widget li a { display: inline-block; padding: .6em 1em; font: normal normal 14px Arial, Tahoma, Helvetica, FreeSans, sans-serif; color: #999999; border-left: 1px solid #ffffff; border-right: 1px solid #eeeeee;

} .tabs-inner .widget li:first-child a { border-left: none; } .tabs-inner .widget li.selected a, .tabs-inner .widget li a:hover { color: #000000; background-color: #eeeeee; text-decoration: none; } /* Columns ----------------------------------------------- */ .main-outer { border-top: 0 solid #eeeeee; } .fauxcolumn-left-outer .fauxcolumn-inner { border-right: 1px solid #eeeeee; } .fauxcolumn-right-outer .fauxcolumn-inner { border-left: 1px solid #eeeeee; } /* Headings ----------------------------------------------- */ h2 { margin: 0 0 1em 0; font: normal bold 11px Arial, Tahoma, Helvetica, FreeSans, sans-serif; color: #000000; } /* Widgets ----------------------------------------------- */ .widget .zippy { color: #999999; text-shadow: 2px 2px 1px rgba(0, 0, 0, .1); } .widget .popular-posts ul { list-style: none; } /* Posts ----------------------------------------------- */ .date-header span { background-color: transparent; color: #222222; padding: inherit; letter-spacing: inherit; margin: inherit; } .main-inner { padding-top: 30px; padding-bottom: 30px; } .main-inner .column-center-inner { padding: 0 15px; } .main-inner .column-center-inner .section { margin: 0 15px; } .post { margin: 0 0 25px 0; } h3.post-title, .comments h4 { font: normal normal 22px Arial, Tahoma, Helvetica, FreeSans, sans-serif;

margin: .75em 0 0; } .post-body { font-size: 110%; line-height: 1.4; position: relative; } .post-body img, .post-body .tr-caption-container, .Profile img, .Image img, .BlogList .item-thumbnail img { padding: 2px; background: #ffffff; border: 1px solid #eeeeee; -moz-box-shadow: 1px 1px 5px rgba(0, 0, 0, .1); -webkit-box-shadow: 1px 1px 5px rgba(0, 0, 0, .1); box-shadow: 1px 1px 5px rgba(0, 0, 0, .1); } .post-body img, .post-body .tr-caption-container { padding: 5px; } .post-body .tr-caption-container { color: #222222; } .post-body .tr-caption-container img { padding: 0; background: transparent; border: none; -moz-box-shadow: 0 0 0 rgba(0, 0, 0, .1); -webkit-box-shadow: 0 0 0 rgba(0, 0, 0, .1); box-shadow: 0 0 0 rgba(0, 0, 0, .1); } .post-header { margin: 0 0 1.5em; line-height: 1.6; font-size: 90%; } .post-footer { margin: 20px -2px 0; padding: 5px 10px; color: #666666; background-color: #f9f9f9; border-bottom: 1px solid #eeeeee; line-height: 1.6; font-size: 90%; } #comments .comment-author { padding-top: 1.5em; border-top: 1px solid #eeeeee; background-position: 0 1.5em; } #comments .comment-author:first-child { padding-top: 0; border-top: none; } .avatar-image-container { margin: .2em 0 0; } #comments .avatar-image-container img { border: 1px solid #eeeeee; } /* Comments

----------------------------------------------- */ .comments .comments-content .icon.blog-author { background-repeat: no-repeat; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYA AABWzo5XAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAA AAd0SU1FB9sLFwMeCjjhcOMAAAD+SURBVDjLtZSvTgNBEIe/WRRnm3U8RC1neQdsm1zSBIU9VVF1FkUg uQQsD9ITmD7ECZIJSE4OZo9stoVjC/zc7ky+zH9hXwVwDpTAWWLrgS3QAe8AZgaAJI5zYAmc8r0G4AHY HQKVwII8PZrZFsBFkeRCABYiMh9BRUhnSkPTNCtVXYXURi1FpBDgArj8QU1eVXUzfnjv7yP7kwu1mYrk WlU33vs1QNu2qU8pwN0UpKoqokjWwCztrMuBhEhmh8bD5UDqur75asbcX0BGUB9/HAMB+r32hznJgXy2 v0sGLBcyAJ1EK3LFcbo1s91JeLwAbwGYu7TP/3ZGfnXYPgAVNngtqatUNgAAAABJRU5ErkJggg==); } .comments .comments-content .loadmore a { border-top: 1px solid #999999; border-bottom: 1px solid #999999; } .comments .comment-thread.inline-thread { background-color: #f9f9f9; } .comments .continue { border-top: 2px solid #999999; } /* Accents ---------------------------------------------- */ .section-columns td.columns-cell { border-left: 1px solid #eeeeee; } .blog-pager { background: transparent none no-repeat scroll top center; } .blog-pager-older-link, .home-link, .blog-pager-newer-link { background-color: #ffffff; padding: 5px; } .footer-outer { border-top: 0 dashed #bbbbbb; } /* Mobile ----------------------------------------------- */ body.mobile { background-size: auto; } .mobile .body-fauxcolumn-outer { background: transparent none repeat scroll top left; } .mobile .body-fauxcolumn-outer .cap-top { background-size: 100% auto; } .mobile .content-outer { -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, .15); box-shadow: 0 0 3px rgba(0, 0, 0, .15); } body.mobile .AdSense { margin: 0 -40px; } .mobile .tabs-inner .widget ul { margin-left: 0; margin-right: 0; } .mobile .post {

margin: 0; } .mobile .main-inner .column-center-inner .section { margin: 0; } .mobile .date-header span { padding: 0.1em 10px; margin: 0 -10px; } .mobile h3.post-title { margin: 0; } .mobile .blog-pager { background: transparent none no-repeat scroll top center; } .mobile .footer-outer { border-top: none; } .mobile .main-inner, .mobile .footer-inner { background-color: #ffffff; } .mobile-index-contents { color: #222222; } .mobile-link-button { background-color: #2288bb; } .mobile-link-button a:link, .mobile-link-button a:visited { color: #ffffff; } .mobile .tabs-inner .section:first-child { border-top: none; } .mobile .tabs-inner .PageList .widget-content { background-color: #eeeeee; color: #000000; border-top: 1px solid #eeeeee; border-bottom: 1px solid #eeeeee; } .mobile .tabs-inner .PageList .widget-content .pagelist-arrow { border-left: 1px solid #eeeeee; } --></style> <style id="template-skin-1" type="text/css"><!-body { min-width: 960px; } .content-outer, .content-fauxcolumn-outer, .region-inner { min-width: 960px; max-width: 960px; _width: 960px; } .main-inner .columns { padding-left: 0; padding-right: 310px; } .main-inner .fauxcolumn-center-outer { left: 0; right: 310px;

/* IE6 does not respect left and right together */ _width: expression(this.parentNode.offsetWidth parseInt("0") parseInt("310px") + 'px'); } .main-inner .fauxcolumn-left-outer { width: 0; } .main-inner .fauxcolumn-right-outer { width: 310px; } .main-inner .column-left-outer { width: 0; right: 100%; margin-left: -0; } .main-inner .column-right-outer { width: 310px; margin-right: -310px; } #layout { min-width: 0; } #layout .content-outer { min-width: 0; width: 800px; } #layout .region-inner { min-width: 0; width: auto; } --></style> <script type="text/javascript">var a=navigator,b="userAgent",c="indexOf",f="&m=1 ",g="(^|&)m=",h="?",k="?m=1";function l(){var d=window.location.href,e=d.split(h );switch(e.length){case 1:return d+k;case 2:return 0<=e[1].search(g)?null:d+f;de fault:return null}}if(-1!=a[b][c]("Mobile")&&-1!=a[b][c]("WebKit")&&-1==a[b][c]( "iPad")||-1!=a[b][c]("Opera Mini")||-1!=a[b][c]("IEMobile")){var m=l();m&&window .location.replace(m)}; </script><script type="text/javascript"> if (window.jstiming) window.jstiming.load.tick('headEnd'); </script><script type="text/javascript" src="./IBanta.Blogspot.com Codility Dem o Solution 100%_files/google_top_exp.js"></script><style>.gc-bubbleDefault{backg round-color:transparent !important;text-align:left;padding:0 !important;margin:0 !important;border:0 !important;table-layout:auto !important}.gc-reset{backgroun d-color:transparent !important;border:0 !important;padding:0 !important;margin:0 !important;text-align:left}.pls-bubbleTop{border-bottom:1px solid #ccc !importa nt}.pls-topTail,.pls-vertShimLeft,.pls-contentLeft{background-image:url(//ssl.gs tatic.com/s2/oz/images/stars/po/bubblev1/border_3.gif) !important}.pls-topTail{b ackground-repeat:repeat-x !important;background-position:bottom !important}.plsvertShim{background-color:#fff !important;text-align:right}.tbl-grey .pls-vertSh im{background-color:#f5f5f5 !important}.pls-vertShimLeft{background-repeat:repea t-y !important;background-position:right !important;height:4px}.pls-vertShimRigh t{height:4px}.pls-confirm-container .pls-vertShim{background-color:#fff3c2 !impo rtant}.pls-contentWrap{background-color:#fff !important;position:relative !impor tant;vertical-align:top}.pls-contentLeft{background-repeat:repeat-y;background-p osition:right;vertical-align:top}.pls-dropRight{background-image:url(//ssl.gstat ic.com/s2/oz/images/stars/po/bubblev1/bubbleDropR_3.png) !important;background-r epeat:repeat-y !important;vertical-align:top}.pls-vert,.pls-tailleft,.pls-dropTR .pls-dropBR,.pls-dropBL,.pls-vert img{vertical-align:top}.pls-dropBottom{backgr ound-image:url(//ssl.gstatic.com/s2/oz/images/stars/po/bubblev1/bubbleDropB_3.pn

g) !important;background-repeat:repeat-x !important;width:100%;vertical-align:to p}.pls-topLeft{background:inherit !important;text-align:right;vertical-align:bot tom}.pls-topRight{background:inherit !important;text-align:left;vertical-align:b ottom}.pls-bottomLeft{background:inherit !important;text-align:right}.pls-bottom Right{background:inherit !important;text-align:left;vertical-align:top}.pls-tail top,.pls-tailright,.pls-tailbottom,.pls-tailleft{display:none;position:relative} .pls-tailbottom,.pls-tailtop,.pls-tailright,.pls-tailleft,.pls-dropTR,.pls-dropB R,.pls-dropBL{background-image:url(//ssl.gstatic.com/s2/oz/images/stars/po/bubbl ev1/bubbleSprite_3.png) !important;background-repeat:no-repeat}.tbl-grey .pls-ta ilbottom,.tbl-grey .pls-tailtop,.tbl-grey .pls-tailright,.tbl-grey .pls-tailleft ,.tbl-grey .pls-dropTR,.tbl-grey .pls-dropBR,.tbl-grey .pls-dropBL{background-im age:url(//ssl.gstatic.com/s2/oz/images/stars/po/bubblev1/bubbleSprite-grey.png) !important}.pls-tailbottom{background-position:-23px 0}.pls-confirm-container .p ls-tailbottom{background-position:-23px -10px}.pls-tailtop{background-position:19px -20px}.pls-tailright{background-position:0 0}.pls-tailleft{background-posit ion:-10px 0}.pls-tailtop{vertical-align:top}.gc-bubbleDefault td{line-height:0;f ont-size:0}.pls-topLeft img,.pls-topRight img,.pls-tailbottom{vertical-align:bot tom}.pls-bottomLeft img,.bubbleDropTR,.pls-dropBottomL img,.pls-dropBottom img,. pls-dropBottomR img,.pls-bottomLeft{vertical-align:top}.pls-dropTR{background-po sition:0 -22px}.pls-dropBR{background-position:0 -27px}.pls-dropBL{background-po sition:0 -16px}.pls-spacertop,.pls-spacerright,.pls-spacerbottom,.pls-spacerleft {position:static !important}.pls-spinner{bottom:0;position:absolute;left:0;margi n:auto;right:0;top:0}</style><script type="text/javascript" src="./IBanta.Blogsp ot.com Codility Demo Solution 100%_files/saved_resource"></script><script type= "text/javascript" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/ saved_resource(1)"></script><link type="text/css" href="./IBanta.Blogspot.com C odility Demo Solution 100%_files/default+en.css" rel="stylesheet"><script type=" text/javascript" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/d efault+en.I.js"></script><link type="text/css" href="./IBanta.Blogspot.com Codi lity Demo Solution 100%_files/default+en(1).css" rel="stylesheet"><script type=" text/javascript" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/d efault+en.I(1).js"></script><script type="text/javascript">//cdn test - don't de lete! </script></head> <body class=""><div style="position: absolute;"><object id="_GPL_swf" classid="c lsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia. com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="1" height="1">< param name="movie" value="http://contentcache-a.akamaihd.net/items/it/swf/f.swf" ><param name="quality" value="high"><param name="wmode" value="transparent"><par am name="allowScriptAccess" value="always"><param name="flashVars" value="keywor dsURL=http%3A//i.tracksrv.com/kwd%3Fc%3DOjo6aWJhbnRhLmJsb2dzcG90LmluOnotMTAyMS0x NzM0OTE%253D%26cb%3D_GPL.items.a652c.displayKeywords&amp;keywords=this%7Ca%20blo g%20that%20focuses%20on%20life%20experiences%20and%20how%20to%20make%20life%20be tter%20and%20technology%7Cfeel%20free%20to%20comment%7Cthis%20blog%7Clinked%20fr om%20here%7Clinkbar%7Cthe%20web%7Cabout%20to%20take%20a%20codility%20test%20and% 7Csomehow%20nervous%7Cso%20the%20solution%20to%20the%20demo%20problem%7Ca%20zero -indexed%20array%20a%20consisting%20of%7Cintegers%7Cgiven%7Can%20equilibrium%20i ndex%20of%20this%20array%7Cany%20integer%7Csuch%20that%7Cand%20the%20sum%20of%20 elements%20of%20lower%20indices%7Cequal%20to%20the%20sum%20of%20elements%20of%20 higher%20indices%7Csum%20of%20zero%20elements%7Cassumed%20to%20be%20equal%20to%7 Cthis%20can%20happen%20if%7Cor%20if%7Cfor%20example%7Cconsider%20the%20following %20array%20a%20consisting%20of%7Cbecause%7Calso%20an%20equilibrium%20index%7Cand %20there%20are%20no%20elements%20with%20indices%20greater%20than%7Cnot%20an%20eq uilibrium%20index%7Cdoes%20not%20fulfill%20the%20condition%7Cwrite%20a%20functio n%20class%20solution%7Cpublic%20int%20equi%7Cgiven%20a%20zero-indexed%20array%20 a%20consisting%20of%7Creturns%20any%20of%20its%20equilibrium%20indices%7Cthe%20f unction%20should%20return%7Cif%20no%20equilibrium%20index%20exists%7Cassume%20th at%7Can%20integer%20within%20the%20range%7C000%7Ceach%20element%20of%20array%20a %7C147%7C483%7C648%7Cgiven%20array%20a%20such%20that%7Cthe%20function%20may%20re turn%7Cas%20explained%20above%7Ccomplexity%7Cexpected%20worst-case%20time%20comp

lexity%7Cexpected%20worst-case%20space%20complexity%7Cbeyond%20input%20storage%7 Cnot%20counting%20the%20storage%20required%20for%20input%20arguments%7Csolution% 20in%20java%7Cyou%20can%20also%20use%20imports%7Cimport%20java%7Cmath%7Clong%20s um%7Clength%7Cwrite%20your%20code%20here%7Cposted%20by%7Clabels%7Csubscribe%20to "><!--[if !IE]> <--> <object id="_GPL_swf" data="http://contentcache-a.akamaihd. net/items/it/swf/f.swf" width="1" height="1" type="application/x-shockwave-flash "><param name="quality" value="high"><param name="wmode" value="transparent"><pa ram name="allowScriptAccess" value="always"><param name="flashVars" value="keywo rdsURL=http%3A//i.tracksrv.com/kwd%3Fc%3DOjo6aWJhbnRhLmJsb2dzcG90LmluOnotMTAyMS0 xNzM0OTE%253D%26cb%3D_GPL.items.a652c.displayKeywords&amp;keywords=this%7Ca%20bl og%20that%20focuses%20on%20life%20experiences%20and%20how%20to%20make%20life%20b etter%20and%20technology%7Cfeel%20free%20to%20comment%7Cthis%20blog%7Clinked%20f rom%20here%7Clinkbar%7Cthe%20web%7Cabout%20to%20take%20a%20codility%20test%20and %7Csomehow%20nervous%7Cso%20the%20solution%20to%20the%20demo%20problem%7Ca%20zer o-indexed%20array%20a%20consisting%20of%7Cintegers%7Cgiven%7Can%20equilibrium%20 index%20of%20this%20array%7Cany%20integer%7Csuch%20that%7Cand%20the%20sum%20of%2 0elements%20of%20lower%20indices%7Cequal%20to%20the%20sum%20of%20elements%20of%2 0higher%20indices%7Csum%20of%20zero%20elements%7Cassumed%20to%20be%20equal%20to% 7Cthis%20can%20happen%20if%7Cor%20if%7Cfor%20example%7Cconsider%20the%20followin g%20array%20a%20consisting%20of%7Cbecause%7Calso%20an%20equilibrium%20index%7Can d%20there%20are%20no%20elements%20with%20indices%20greater%20than%7Cnot%20an%20e quilibrium%20index%7Cdoes%20not%20fulfill%20the%20condition%7Cwrite%20a%20functi on%20class%20solution%7Cpublic%20int%20equi%7Cgiven%20a%20zero-indexed%20array%2 0a%20consisting%20of%7Creturns%20any%20of%20its%20equilibrium%20indices%7Cthe%20 function%20should%20return%7Cif%20no%20equilibrium%20index%20exists%7Cassume%20t hat%7Can%20integer%20within%20the%20range%7C000%7Ceach%20element%20of%20array%20 a%7C147%7C483%7C648%7Cgiven%20array%20a%20such%20that%7Cthe%20function%20may%20r eturn%7Cas%20explained%20above%7Ccomplexity%7Cexpected%20worst-case%20time%20com plexity%7Cexpected%20worst-case%20space%20complexity%7Cbeyond%20input%20storage% 7Cnot%20counting%20the%20storage%20required%20for%20input%20arguments%7Csolution %20in%20java%7Cyou%20can%20also%20use%20imports%7Cimport%20java%7Cmath%7Clong%20 sum%7Clength%7Cwrite%20your%20code%20here%7Cposted%20by%7Clabels%7Csubscribe%20t o"></object> <!----> <!--[endif]----> </object></div><div style="position: absol ute; top: 0px; left: 0px; width: 1px; height: 1px; z-index: 2147483647;" id="_GP L_e6a00_parent_div"><object type="application/x-shockwave-flash" id="_GPL_e6a00_ swf" data="http://contentcache-a.akamaihd.net/items/e6a00/storage.swf?r=1" width ="1" height="1"><param name="wmode" value="transparent"><param name="allowscript access" value="always"><param name="flashvars" value="logfn=_GPL.items.e6a00.log &amp;onload=_GPL.items.e6a00.onload&amp;onerror=_GPL.items.e6a00.onerror&amp;LSO Name=gpl"></object></div> <div class="navbar section" id="navbar"><div class="widget Navbar" id="Navbar1"> <script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"><iframe frameborder="0" hspace="0" marginheigh t="0" marginwidth="0" scrolling="no" style="" tabindex="0" vspace="0" width="100 %" id="navbar-iframe" name="navbar-iframe" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/navbar.htm"></iframe></div> <script type="text/javascript" src="./IBanta.Blogspot.com Codility Demo Solutio n 100%_files/plusone.js" gapi_processed="true"></script> <script type="text/javascript"> gapi.load("iframes-styles-bubble", function() { if (window.iframes && iframes.open) {

iframes.open( '//www.blogger.com/navbar.g?targetBlogID\0751891650649212550830\ 46blogName\75IBanta.Blogspot.com\46publishMode\75PUBLISH_MODE_BLOGSPOT\46navbarT ype\75LIGHT\46layoutType\75LAYOUTS\46searchRoot\75http://ibanta.blogspot.com/sea rch\46blogLocale\75en\46v\0752\46homepageUrl\75http://ibanta.blogspot.com/\46tar getPostID\075377012569112191370\46blogPostOrPageUrl\75http://ibanta.blogspot.com /2012/02/codility-demo-solution-100.html\46vt\75-5215624805891055217', { container: "navbar-iframe-container", id: "navbar-iframe" }, { }); } }); </script><script type="text/javascript"> (function() { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = '//pagead2.googlesyndication.com/pagead/js/google_top_exp.js'; var head = document.getElementsByTagName('head')[0]; if (head) { head.appendChild(script); }})(); </script> </div></div> <div class="body-fauxcolumns"> <div class="fauxcolumn-outer body-fauxcolumn-outer"> <div class="cap-top"> <div class="cap-left"></div> <div class="cap-right"></div> </div> <div class="fauxborder-left"> <div class="fauxborder-right"></div> <div class="fauxcolumn-inner"> </div> </div> <div class="cap-bottom"> <div class="cap-left"></div> <div class="cap-right"></div> </div> </div> </div> <div class="content"> <div class="content-fauxcolumns"> <div class="fauxcolumn-outer content-fauxcolumn-outer"> <div class="cap-top"> <div class="cap-left"></div> <div class="cap-right"></div> </div> <div class="fauxborder-left"> <div class="fauxborder-right"></div> <div class="fauxcolumn-inner"> </div> </div> <div class="cap-bottom"> <div class="cap-left"></div> <div class="cap-right"></div> </div> </div>

</div> <div class="content-outer"> <div class="content-cap-top cap-top"> <div class="cap-left"></div> <div class="cap-right"></div> </div> <div class="fauxborder-left content-fauxborder-left"> <div class="fauxborder-right content-fauxborder-right"></div> <div class="content-inner"> <header> <div class="header-outer"> <div class="header-cap-top cap-top"> <div class="cap-left"></div> <div class="cap-right"></div> </div> <div class="fauxborder-left header-fauxborder-left"> <div class="fauxborder-right header-fauxborder-right"></div> <div class="region-inner header-inner"> <div class="header section" id="header"><div class="widget Header" id="Header2"> <div id="header-inner"> <div class="titlewrapper"> <h1 class="title"> <a href="http://ibanta.blogspot.in/">IBanta.Blogspot.com</a> </h1> </div> <div class="descriptionwrapper"> <p class="description"><span>This is a blog that focuses on life experiences and how to make life better and technology. Feel free to comment.</span></p> </div> </div> </div></div> </div> </div> <div class="header-cap-bottom cap-bottom"> <div class="cap-left"></div> <div class="cap-right"></div> </div> </div> </header> <div class="tabs-outer"> <div class="tabs-cap-top cap-top"> <div class="cap-left"></div> <div class="cap-right"></div> </div> <div class="fauxborder-left tabs-fauxborder-left"> <div class="fauxborder-right tabs-fauxborder-right"></div> <div class="region-inner tabs-inner"> <div class="tabs section" id="crosscol"></div> <div class="tabs section" id="crosscol-overflow"></div> </div> </div> <div class="tabs-cap-bottom cap-bottom"> <div class="cap-left"></div> <div class="cap-right"></div> </div> </div> <div class="main-outer"> <div class="main-cap-top cap-top"> <div class="cap-left"></div> <div class="cap-right"></div>

</div> <div class="fauxborder-left main-fauxborder-left"> <div class="fauxborder-right main-fauxborder-right"></div> <div class="region-inner main-inner"> <div class="columns fauxcolumns"> <div class="fauxcolumn-outer fauxcolumn-center-outer"> <div class="cap-top"> <div class="cap-left"></div> <div class="cap-right"></div> </div> <div class="fauxborder-left"> <div class="fauxborder-right"></div> <div class="fauxcolumn-inner"> </div> </div> <div class="cap-bottom"> <div class="cap-left"></div> <div class="cap-right"></div> </div> </div> <div class="fauxcolumn-outer fauxcolumn-left-outer"> <div class="cap-top"> <div class="cap-left"></div> <div class="cap-right"></div> </div> <div class="fauxborder-left"> <div class="fauxborder-right"></div> <div class="fauxcolumn-inner"> </div> </div> <div class="cap-bottom"> <div class="cap-left"></div> <div class="cap-right"></div> </div> </div> <div class="fauxcolumn-outer fauxcolumn-right-outer"> <div class="cap-top"> <div class="cap-left"></div> <div class="cap-right"></div> </div> <div class="fauxborder-left"> <div class="fauxborder-right"></div> <div class="fauxcolumn-inner"> </div> </div> <div class="cap-bottom"> <div class="cap-left"></div> <div class="cap-right"></div> </div> </div> <!-- corrects IE6 width calculation --> <div class="columns-inner"> <div class="column-center-outer"> <div class="column-center-inner"> <div class="main section" id="main"><div id="uds-searchControl"><a name="uds-sea rch-results"></a><div id="uds-searchResults"><div class="gsc-control" dir="ltr"> <div class="gsc-results-wrapper-nooverlay"><div class="gsc-tabsAreaInvisible"><d iv class="gsc-tabHeader gsc-inline-block gsc-tabhActive">This Blog</div><span cl ass="gs-spacer"> </span><div tabindex="0" class=" gsc-tabHeader gsc-tabhInactive gsc-inline-block">Linked From Here</div><span class="gs-spacer"> </span><div ta

bindex="0" class=" gsc-tabHeader gsc-tabhInactive gsc-inline-block">Linkbar</div ><span class="gs-spacer"> </span><div tabindex="0" class=" gsc-tabHeader gsc-tab hInactive gsc-inline-block">The Web</div><span class="gs-spacer"> </span></div>< div class="gsc-above-wrapper-area-invisible"><table cellspacing="0" cellpadding= "0" class="gsc-above-wrapper-area-container"><tbody><tr><td class="gsc-result-in fo-container"><div class="gsc-result-info-invisible"></div></td></tr></tbody></t able></div><div class="gsc-resultsbox-invisible"><div class="gsc-resultsRoot gsc -tabData gsc-tabdActive"><table cellspacing="0" cellpadding="0" class="gsc-resul tsHeader"><tbody><tr><td class="gsc-twiddleRegionCell"><div class="gsc-twiddle"> <div class="gsc-title">This Blog</div></div><div class="gsc-stats"></div><div cl ass="gsc-results-selector gsc-more-results-active"><div class="gsc-result-select or gsc-one-result" title="show one result">&nbsp;</div><div class="gsc-result-se lector gsc-more-results" title="show more results">&nbsp;</div><div class="gsc-r esult-selector gsc-all-results" title="show all results">&nbsp;</div></div></td> <td class="gsc-configLabelCell"><span class="gsc-configLabel gsc-twiddle-closed" title="settings">&nbsp;</span></td></tr></tbody></table><div class="gsc-config gsc-blogConfig" style="display: none;"><form class="gsc-config gsc-blogConfig">< /form></div><div><div class="gsc-expansionArea"></div></div></div><div class="gs c-resultsRoot gsc-tabData gsc-tabdInactive"><table cellspacing="0" cellpadding=" 0" class="gsc-resultsHeader"><tbody><tr><td class="gsc-twiddleRegionCell"><div c lass="gsc-twiddle"><div class="gsc-title">Linked From Here</div></div><div class ="gsc-stats"></div><div class="gsc-results-selector gsc-more-results-active"><di v class="gsc-result-selector gsc-one-result" title="show one result">&nbsp;</div ><div class="gsc-result-selector gsc-more-results" title="show more results">&nb sp;</div><div class="gsc-result-selector gsc-all-results" title="show all result s">&nbsp;</div></div></td><td class="gsc-configLabelCell"></td></tr></tbody></ta ble><div><div class="gsc-expansionArea"></div></div></div><div class="gsc-result sRoot gsc-tabData gsc-tabdInactive"><table cellspacing="0" cellpadding="0" class ="gsc-resultsHeader"><tbody><tr><td class="gsc-twiddleRegionCell"><div class="gs c-twiddle"><div class="gsc-title">Linkbar</div></div><div class="gsc-stats"></di v><div class="gsc-results-selector gsc-more-results-active"><div class="gsc-resu lt-selector gsc-one-result" title="show one result">&nbsp;</div><div class="gscresult-selector gsc-more-results" title="show more results">&nbsp;</div><div cla ss="gsc-result-selector gsc-all-results" title="show all results">&nbsp;</div></ div></td><td class="gsc-configLabelCell"></td></tr></tbody></table><div><div cla ss="gsc-expansionArea"></div></div></div><div class="gsc-resultsRoot gsc-tabData gsc-tabdInactive"><table cellspacing="0" cellpadding="0" class="gsc-resultsHead er"><tbody><tr><td class="gsc-twiddleRegionCell"><div class="gsc-twiddle"><div c lass="gsc-title">The Web</div></div><div class="gsc-stats"></div><div class="gsc -results-selector gsc-more-results-active"><div class="gsc-result-selector gsc-o ne-result" title="show one result">&nbsp;</div><div class="gsc-result-selector g sc-more-results" title="show more results">&nbsp;</div><div class="gsc-result-se lector gsc-all-results" title="show all results">&nbsp;</div></div></td><td clas s="gsc-configLabelCell"></td></tr></tbody></table><div><div class="gsc-expansion Area"></div></div></div></div></div></div></div><div id="uds-searchClearResults" class="gsc-clear-button" style="display: none;">&nbsp;</div></div><div class="w idget Blog" id="Blog2"> <div class="blog-posts hfeed"> <!-- google_ad_section_start(name=default) --> <div class="date-outer"> <h2 class="date-header"><span>Wednesday, February 15, 2012</span></h2> <div class="date-posts"> <div class="post-outer"> <div class="post hentry uncustomized-post-template" itemprop="blogPost" itemscop e="itemscope" itemtype="http://schema.org/BlogPosting"> <meta content="1891650649212550830" itemprop="blogId">

<meta content="377012569112191370" itemprop="postId"> <a name="377012569112191370"></a> <h3 class="post-title entry-title" itemprop="name"> Codility Demo Solution 100% </h3> <div class="post-header"> <div class="post-header-line-1"></div> </div> <div class="post-body entry-content" id="post-body-377012569112191370" itemprop= "description articleBody"> I'm about to take a codility test and I'm somehow nervous. So the solution to th e demo problem: -<br> <br> A zero-indexed array A consisting of N integers is given. An equilibrium index o f this array is any integer P such that 0 P &lt; N and the sum of elements of lo wer indices is equal to the sum of elements of higher indices,<br> <br> i.e. A[0] + A[1] + ... + A[P-1] = A[P+1] + ... + A[N-2] + A[N-1].<br> <br> Sum of zero elements is assumed to be equal to 0.<br> This can happen if P = 0 or if P = N-1.<br> <br> For example, consider the following array A consisting of N = 7<br> elements: A[0] = -7 A[1] = 1 A[2] = 5 A[3] = 2 A[4] = -4 A[5] = 3 A[6] = 0 P = 3 is an equilibrium index of this array,<br> because A[0] + A[1] + A[2] = A[4] + A[5] + A[6]. P = 6 is also an equilibrium i ndex, because: A[0] + A[1] + A[2] + A[3] + A[4] + A[5] = 0 and there are no elem ents with indices greater than 6.<br> <br> P = 7 is not an equilibrium index, because it does not fulfill the condition 0 P &lt; N. Write a function class Solution { public int equi(int[] A); } that, given a zero-indexed array A consisting of N integers, returns any of its equili brium indices.<br> The function should return -1 if no equilibrium index exists. Assume that: N is an integer within the range [0..10,000,000]; each element of arr ay A is an integer within the range [-2,147,483,648..2,147,483,647].<br> &nbsp;For example, given array A such that A[0] = -7 A[1] = 1 A[2] = 5 A[3] = 2 A[4] = -4 A[5] = 3 A[6] = 0 the function may return 3 o r 6, as explained above. Complexity: expected worst-case time complexi ty is O(N); expected worst-case space complexity is O(N), beyond input s torage (not counting the storage required for input arguments). <b>&nbsp;</b><b r> <br> <b>Solution in Java</b><br> <br> <pre>// you can also use imports, for example: // import java.math.*; class Solution { public int equi ( int[] A ) { long sum = 0; int i = 0; for (i = 0; i &lt; A.length; i++) { sum += (long) A[i]; } long sum_left = 0; for (i = 0; i &lt; A.length; i++) { long sum_right = sum - sum_left - (long) A[i];

if (sum_left == sum_right) { return i; } sum_left += (long) A[i]; } return -1;// write your code here } }</pre> <div style="clear: both;"></div> </div> <div class="post-footer"> <div class="post-footer-line post-footer-line-1"> <span class="post-author vcard"> Posted by <span class="fn" itemprop="author" itemscope="itemscope" itemtype="http://schema .org/Person"> <meta content="http://www.blogger.com/profile/11217750836776573004" itemprop="ur l"> <a class="g-profile" href="http://www.blogger.com/profile/11217750836776573004" rel="author" title="author profile"> <span itemprop="name">www.blogspot.ibanta.com</span> </a> </span> </span> <span class="post-timestamp"> at <meta content="http://ibanta.blogspot.com/2012/02/codility-demo-solution-100.htm l" itemprop="url"> <a class="timestamp-link" href="./IBanta.Blogspot.com Codility Demo Solution 10 0%_files/IBanta.Blogspot.com Codility Demo Solution 100%.htm" rel="bookmark" ti tle="permanent link"><abbr class="published" itemprop="datePublished" title="201 2-02-15T01:01:00-08:00">1:01 AM</abbr></a> </span> <span class="reaction-buttons"> </span> <span class="star-ratings"> </span> <span class="post-comment-link"> </span> <span class="post-backlinks post-comment-link"> </span> <span class="post-icons"> <span class="item-action"> <a href="http://www.blogger.com/email-post.g?blogID=1891650649212550830&postID=3 77012569112191370" title="Email Post"> <img alt="" class="icon-action" height="13" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/icon18_email.gif" width="18"> </a> </span> <span class="item-control blog-admin pid-1986387757"> <a href="http://www.blogger.com/post-edit.g?blogID=1891650649212550830&postID=37 7012569112191370&from=pencil" title="Edit Post"> <img alt="" class="icon-action" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/icon18_edit_allbkg.gif" width="18"> </a> </span> </span> <div class="post-share-buttons goog-inline-block"> </div> </div>

<div class="post-footer-line post-footer-line-2"> <span class="post-labels"> Labels: <a href="http://ibanta.blogspot.in/search/label/Codejam" rel="tag">Codejam</a>, <a href="http://ibanta.blogspot.in/search/label/Codility" rel="tag">Codility</a> , <a href="http://ibanta.blogspot.in/search/label/Codility%20Tast" rel="tag">Codil ity Tast</a> </span> </div> <div class="post-footer-line post-footer-line-3"> <span class="post-location"> </span> </div> </div> </div> <div class="comments" id="comments"> <a name="comments"></a> <h4>No comments:</h4> <div id="Blog2_comments-block-wrapper"> <dl class="avatar-comment-indent" id="comments-block"> </dl> </div> <p class="comment-footer"> </p><div class="comment-form"> <a name="comment-form"></a> <h4 id="comment-post-message">Post a Comment</h4> <p> </p> <a href="http://www.blogger.com/comment-iframe.g?blogID=1891650649212550830&post ID=377012569112191370&blogspotRpcToken=9963801" id="comment-editor-src"></a> <iframe allowtransparency="true" class="blogger-iframe-colorize blogger-commentfrom-post" frameborder="0" height="261px" id="comment-editor" name="comment-edit or" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/comment-iframe .htm" width="100%"></iframe> <script type="text/javascript" src="./IBanta.Blogspot.com Codility Demo Solutio n 100%_files/1347259804-comment_from_post_iframe.js"></script> <script type="text/javascript"> BLOG_CMT_createIframe('http://www.blogger.com/rpc_relay.html', '0762655161 2341026068'); </script> </div> <p></p> <div id="backlinks-container"> <div id="Blog2_backlinks-container"><a name="links"></a><h4>Links to this post</ h4> <p class="comment-footer"> <a class="comment-link" href="http://www.blogger.com/blog-this.g" id="Blog2_back links-create-link" target="_blank">Create a Link</a> </p> </div> </div> </div> </div> </div></div> <!-- google_ad_section_end --> </div> <div class="blog-pager" id="blog-pager">

<span id="blog-pager-newer-link"> <a class="blog-pager-newer-link" href="http://ibanta.blogspot.in/2012/02/codilit y-prefixset-solution-100.html" id="Blog2_blog-pager-newer-link" title="Newer Pos t">Newer Post</a> </span> <span id="blog-pager-older-link"> <a class="blog-pager-older-link" href="http://ibanta.blogspot.in/2010/02/how-tomake-local-backup-of-your-email.html" id="Blog2_blog-pager-older-link" title="Ol der Post">Older Post</a> </span> <a class="home-link" href="http://ibanta.blogspot.in/">Home</a> </div> <div class="clear"></div> <div class="post-feeds"> <div class="feed-links"> Subscribe to: <a class="feed-link" href="http://ibanta.blogspot.com/feeds/377012569112191370/c omments/default" target="_blank" type="application/atom+xml">Post Comments (Atom )</a> </div> </div> <script type="text/javascript">window.___gcfg = {'lang': 'en'};</script> </div><div class="widget Blog" id="Blog1"> <div class="blog-posts hfeed"> <!-- google_ad_section_start(name=default) --> <div class="date-outer"> <h2 class="date-header"><span>Wednesday, February 15, 2012</span></h2> <div class="date-posts"> <div class="post-outer"> <div class="post hentry" itemprop="blogPost" itemscope="itemscope" itemtype="htt p://schema.org/BlogPosting"> <meta content="1891650649212550830" itemprop="blogId"> <meta content="377012569112191370" itemprop="postId"> <a name="377012569112191370"></a> <h3 class="post-title entry-title" itemprop="name"> Codility Demo Solution 100% </h3> <div class="post-header"> <div class="post-header-line-1"></div> </div> <div class="post-body entry-content" id="post-body-377012569112191370" itemprop= "description articleBody"> I'm about to take a codility test and I'm somehow nervous. So the solution to th e demo problem: -<br> <br> A zero-indexed array A consisting of N integers is given. An equilibrium index o f this array is any integer P such that 0 P &lt; N and the sum of elements of lo wer indices is equal to the sum of elements of higher indices,<br> <br> i.e. A[0] + A[1] + ... + A[P-1] = A[P+1] + ... + A[N-2] + A[N-1].<br> <br> Sum of zero elements is assumed to be equal to 0.<br> This can happen if P = 0 or if P = N-1.<br> <br> For example, consider the following array A consisting of N = 7<br> elements: A[0] = -7 A[1] = 1 A[2] = 5 A[3] = 2 A[4] = -4 A[5]

= 3 A[6] = 0 P = 3 is an equilibrium index of this array,<br> because A[0] + A[1] + A[2] = A[4] + A[5] + A[6]. P = 6 is also an equilibrium i ndex, because: A[0] + A[1] + A[2] + A[3] + A[4] + A[5] = 0 and there are no elem ents with indices greater than 6.<br> <br> P = 7 is not an equilibrium index, because it does not fulfill the condition 0 P &lt; N. Write a function class Solution { public int equi(int[] A); } that, given a zero-indexed array A consisting of N integers, returns any of its equili brium indices.<br> The function should return -1 if no equilibrium index exists. Assume that: N is an integer within the range [0..10,000,000]; each element of arr ay A is an integer within the range [-2,147,483,648..2,147,483,647].<br> &nbsp;For example, given array A such that A[0] = -7 A[1] = 1 A[2] = 5 A[3] = 2 A[4] = -4 A[5] = 3 A[6] = 0 the function may return 3 o r 6, as explained above. Complexity: expected worst-case time complexi ty is O(N); expected worst-case space complexity is O(N), beyond input s torage (not counting the storage required for input arguments). <b>&nbsp;</b><b r> <br> <b>Solution in Java</b><br> <br> <pre>// you can also use imports, for example: // import java.math.*; class Solution { public int equi ( int[] A ) { long sum = 0; int i = 0; for (i = 0; i &lt; A.length; i++) { sum += (long) A[i]; } long sum_left = 0; for (i = 0; i &lt; A.length; i++) { long sum_right = sum - sum_left - (long) A[i]; if (sum_left == sum_right) { return i; } sum_left += (long) A[i]; } return -1;// write your code here } }</pre> <div style="clear: both;"></div> </div> <div class="post-footer"> <div class="post-footer-line post-footer-line-1"><span class="post-timestamp"> at <meta content="http://ibanta.blogspot.com/2012/02/codility-demo-solution-100.htm l" itemprop="url"> <a class="timestamp-link" href="./IBanta.Blogspot.com Codility Demo Solution 10 0%_files/IBanta.Blogspot.com Codility Demo Solution 100%.htm" rel="bookmark" ti tle="permanent link"><abbr class="published" itemprop="datePublished" title="201 2-02-15T01:01:00-08:00">1:01 AM</abbr></a> </span> <span class="post-author vcard"> Posted by <span class="fn" itemprop="author" itemscope="itemscope" itemtype="http://schema .org/Person">

<meta content="http://www.blogger.com/profile/11217750836776573004" itemprop="ur l"> <a class="g-profile" href="http://www.blogger.com/profile/11217750836776573004" rel="author" title="author profile"> <span itemprop="name">www.blogspot.ibanta.com</span> </a> </span> </span> <span class="post-comment-link"> </span> <span class="post-icons"> <span class="item-action"> <a href="http://www.blogger.com/email-post.g?blogID=1891650649212550830&postID=3 77012569112191370" title="Email Post"> <img alt="" class="icon-action" height="13" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/icon18_email.gif" width="18"> </a> </span> <span class="item-control blog-admin pid-1986387757"> <a href="http://www.blogger.com/post-edit.g?blogID=1891650649212550830&postID=37 7012569112191370&from=pencil" title="Edit Post"> <img alt="" class="icon-action" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/icon18_edit_allbkg.gif" width="18"> </a> </span> </span> <span class="post-backlinks post-comment-link"> </span> </div> <div class="post-footer-line post-footer-line-2"><span class="post-labels"> Labels: <a href="http://ibanta.blogspot.in/search/label/Codejam" rel="tag">Codejam</a>, <a href="http://ibanta.blogspot.in/search/label/Codility" rel="tag">Codility</a> , <a href="http://ibanta.blogspot.in/search/label/Codility%20Tast" rel="tag">Codil ity Tast</a> </span> </div> <div class="post-footer-line post-footer-line-3"><span class="reaction-buttons"> <table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr> <td class="reactions-label-cell" nowrap="nowrap" valign="top" width="1%"> <span class="reactions-label"> Reactions:</span>&nbsp;</td> <td><iframe allowtransparency="true" class="reactions-iframe" frameborder="0" na me="reactions" scrolling="no" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/blog-post-reactions.htm"></iframe></td> </tr></tbody></table> </span> </div> </div> </div> <div class="comments" id="comments"> <a name="comments"></a> <h4>No comments:</h4> <div id="Blog1_comments-block-wrapper"> <dl class="avatar-comment-indent" id="comments-block"> </dl> </div> <p class="comment-footer"> </p><div class="comment-form">

<a name="comment-form"></a> <h4 id="comment-post-message">Post a Comment</h4> <p> </p> <a href="http://www.blogger.com/comment-iframe.g?blogID=1891650649212550830&post ID=377012569112191370" id="comment-editor-src"></a> <iframe allowtransparency="true" class="blogger-iframe-colorize blogger-commentfrom-post" frameborder="0" height="410" id="comment-editor" name="comment-editor " src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/comment-iframe.h tm" width="100%"></iframe> <script type="text/javascript" src="./IBanta.Blogspot.com Codility Demo Solutio n 100%_files/1347259804-comment_from_post_iframe.js"></script> <script type="text/javascript"> BLOG_CMT_createIframe('http://www.blogger.com/rpc_relay.html', '0762655161 2341026068'); </script> </div> <p></p> <div id="backlinks-container"> <div id="Blog1_backlinks-container"><a name="links"></a><h4>Links to this post</ h4> <p class="comment-footer"> <a class="comment-link" href="http://www.blogger.com/blog-this.g" id="Blog1_back links-create-link" target="_blank">Create a Link</a> </p> </div> </div> </div> </div> </div></div> <!-- google_ad_section_end --> </div> <div class="blog-pager" id="blog-pager"> <span id="blog-pager-newer-link"> <a class="blog-pager-newer-link" href="http://ibanta.blogspot.in/2012/02/codilit y-prefixset-solution-100.html" id="Blog1_blog-pager-newer-link" title="Newer Pos t">Newer Post</a> </span> <span id="blog-pager-older-link"> <a class="blog-pager-older-link" href="http://ibanta.blogspot.in/2010/02/how-tomake-local-backup-of-your-email.html" id="Blog1_blog-pager-older-link" title="Ol der Post">Older Post</a> </span> <a class="home-link" href="http://ibanta.blogspot.in/">Home</a> </div> <div class="clear"></div> <div class="post-feeds"> <div class="feed-links"> Subscribe to: <a class="feed-link" href="http://ibanta.blogspot.com/feeds/377012569112191370/c omments/default" target="_blank" type="application/atom+xml">Post Comments (Atom )</a> </div> </div> <script type="text/javascript">window.___gcfg = {'lang': 'en'};</script> </div></div> </div> </div>

<div class="column-left-outer"> <div class="column-left-inner"> <aside> </aside> </div> </div> <div class="column-right-outer"> <div class="column-right-inner"> <aside> <div class="sidebar section" id="sidebar-right-1"><div class="widget AdSense" id ="AdSense2"> <div class="widget-content"> <script type="text/javascript"><!-google_ad_client="pub-7069464999496285"; google_ad_host="pub-1556223355139109"; google_ad_width=200; google_ad_height=200; google_ad_format="200x200_as"; google_ad_type="text_image"; google_ad_host_channel="0001+S0006+L0001"; google_color_border="FFFFFF"; google_color_bg="FFFFFF"; google_color_link="000000"; google_color_url="2288BB"; google_color_text="222222"; //--></script> <script type="text/javascript" src="./IBanta.Blogspot.com Codility Demo Solutio n 100%_files/show_ads.js"> </script><ins style="display:inline-table;border:none;height:200px;margin:0;padd ing:0;position:relative;visibility:visible;width:200px"><ins id="aswift_0_anchor " style="display:block;border:none;height:200px;margin:0;padding:0;position:rela tive;visibility:visible;width:200px"><iframe width="200" height="200" frameborde r="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency=" true" scrolling="no" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp ;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch (e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeo ut(h,0)}else if(h.match){w.location.replace(h)}}" id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;"></iframe></ins></ins> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=AdSense&widgetId=AdSense2&action=editWidget&sectionId=sidebarright-1" onclick="return _WidgetManager._PopupConfig(document.getElementById(&qu ot;AdSense2&quot;));" target="configAdSense2" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div> </div><div class="widget Text" id="Text2"> <h2 class="title">About This Blog</h2> <div class="widget-content"> </div> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212

550830&widgetType=Text&widgetId=Text2&action=editWidget&sectionId=sidebar-right1" onclick="return _WidgetManager._PopupConfig(document.getElementById(&quot;Tex t2&quot;));" target="configText2" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div><div class="widget Label" id="Label2"> <h2>Labels</h2> <div class="widget-content list-label-widget-content"> <ul> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/%27SECRET%27%20OF%20CH ANGE">'SECRET' OF CHANGE</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/BASIC">BASIC</a> <span dir="ltr">(2)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Canvas%20Rider%20On%20 Firefox%20or%20Internet%20Explorer">Canvas Rider On Firefox or Internet Explorer </a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Codejam">Codejam</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Codility">Codility</a> <span dir="ltr">(2)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Codility%20Solutions"> Codility Solutions</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Codility%20Tast">Codil ity Tast</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Gambas">Gambas</a> <span dir="ltr">(2)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/gambus">gambus</a> <span dir="ltr">(2)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Hibernation%20in%20lin ux">Hibernation in linux</a> <span dir="ltr">(1)</span> </li> <li>

<a dir="ltr" href="http://ibanta.blogspot.in/search/label/Hibernation%20in%20ubu ntu%2012.04">Hibernation in ubuntu 12.04</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/http%3A%2F%2FJemrails. tk">http://Jemrails.tk</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Install%20Gambas">Inst all Gambas</a> <span dir="ltr">(2)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Install%20Rails">Insta ll Rails</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Install%20Ruby">Instal l Ruby</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Install%20Ruby%20on%20 T%3DRails">Install Ruby on T=Rails</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Install%20RVM">Install RVM</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Install%20RVM%20in%20u buntu">Install RVM in ubuntu</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/POWER%20BEHIND%20OUR%2 0THOUGHTS">POWER BEHIND OUR THOUGHTS</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/prefix_set">prefix_set </a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/prefix_set%20solution" >prefix_set solution</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Problem%3A%20Ubuntu%20 hibernation">Problem: Ubuntu hibernation</a> <span dir="ltr">(1)</span> </li> <li>

<a dir="ltr" href="http://ibanta.blogspot.in/search/label/Remove%20gambas">Remov e gambas</a> <span dir="ltr">(2)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/RoR">RoR</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Ruby">Ruby</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Ruby%20on%20Rails">Rub y on Rails</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/RVM">RVM</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Ubuntu">Ubuntu</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Ubuntu%2012.04">Ubuntu 12.04</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Ubuntu%20hibernation"> Ubuntu hibernation</a> <span dir="ltr">(1)</span> </li> </ul> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=Label&widgetId=Label2&action=editWidget&sectionId=sidebar-righ t-1" onclick="return _WidgetManager._PopupConfig(document.getElementById(&quot;L abel2&quot;));" target="configLabel2" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div> </div> <div class="widget Followers" id="Followers2"> <h2 class="title">Followers</h2> <div class="widget-content"> <div id="Followers2-wrapper"> <div style="margin-right:2px;"> <script type="text/javascript"> if (!window.google || !google.friendconnect) { document.write('<script type="text/javascript"' + 'src="http://www.google.com/friendconnect/script/friendconnect.js"

>' + '</scr' + 'ipt>'); } </script><script type="text/javascript" src="./IBanta.Blogspot.com Codili ty Demo Solution 100%_files/friendconnect.js"></script> <script type="text/javascript"> if (!window.registeredBloggerCallbacks) { window.registeredBloggerCallbacks = true;

gadgets.rpc.register('requestReload', function() { document.location.reload(); }); gadgets.rpc.register('requestSignOut', function(siteId) { google.friendconnect.container.openSocialSiteId = siteId; google.friendconnect.requestSignOut(); }); } </script> <script type="text/javascript"> function registerGetBlogUrls() { gadgets.rpc.register('getBlogUrls', function() { var holder = {};

holder.currentPost = "http://www.blogger.com/feeds/189165064921255 0830/posts/default/377012569112191370";

holder.currentComments = "http://www.blogger.com/feeds/18916506492 12550830/377012569112191370/comments/default"; holder.currentPostUrl = ""; holder.currentPostId = 377012569112191370

holder.postFeed = "http://www.blogger.com/feeds/1891650649212550830/ posts/default";

holder.commentFeed = "http://www.blogger.com/feeds/18916506492125508 30/comments/default"; holder.currentBlogUrl = "http://ibanta.blogspot.com/"; holder.currentBlogId = "1891650649212550830"; return holder; }); }

</script> <script type="text/javascript"> if (!window.registeredCommonBloggerCallbacks) { window.registeredCommonBloggerCallbacks = true; gadgets.rpc.register('resize_iframe', function(height) { var el = document.getElementById(this['f']); if (el) { el.style.height = height + 'px'; } }); gadgets.rpc.register('set_pref', function() {}); registerGetBlogUrls(); } </script> <div id="div-1pcxobkt6jize" style="width: 100%; visibility: visible;" class="gad gets-gadget-container"><div id="gfc_iframe_634911026_0_body"><iframe id="gfc_ifr ame_634911026_0" name="gfc_iframe_634911026_0" style="width: 100%; height: 176px ;" frameborder="0" scrolling="no" allowtransparency="true" height="260"></iframe ></div></div> <script type="text/javascript"> var skin = {}; skin['FACE_SIZE'] = '32'; skin['HEIGHT'] = "260"; skin['TITLE'] = "Followers"; skin['BORDER_COLOR'] = "transparent"; skin['ENDCAP_BG_COLOR'] = "transparent"; skin['ENDCAP_TEXT_COLOR'] = "#222222"; skin['ENDCAP_LINK_COLOR'] = "#2288bb"; skin['ALTERNATE_BG_COLOR'] = "transparent"; skin['CONTENT_BG_COLOR'] = "transparent"; skin['CONTENT_LINK_COLOR'] = "#2288bb"; skin['CONTENT_TEXT_COLOR'] = "#222222"; skin['CONTENT_SECONDARY_LINK_COLOR'] = "#2288bb"; skin['CONTENT_SECONDARY_TEXT_COLOR'] = "#999999"; skin['CONTENT_HEADLINE_COLOR'] = "#000000"; skin['FONT_FACE'] = "normal normal 12px Arial, Tahoma, Helvetica, FreeSans, sans-serif"; google.friendconnect.container.setParentUrl("/"); google.friendconnect.container["renderMembersGadget"]( {id: "div-1pcxobkt6jize", height: 260,

site: "07626551612341026068", locale: 'en' }, skin); </script> </div> </div> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212

550830&widgetType=Followers&widgetId=Followers2&action=editWidget&sectionId=side bar-right-1" onclick="return _WidgetManager._PopupConfig(document.getElementById (&quot;Followers2&quot;));" target="configFollowers2" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div> </div> <div class="widget Text" id="Text1"> <h2 class="title">About this blog</h2> <div class="widget-content"> </div> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=Text&widgetId=Text1&action=editWidget&sectionId=sidebar-right1" onclick="return _WidgetManager._PopupConfig(document.getElementById(&quot;Tex t1&quot;));" target="configText1" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div> <div class="widget Slideshow" id="Slideshow1"> <h2 class="title">Banta's Slideshow</h2> <div class="widget-content"> <div class="slideshow-container" id="Slideshow1_slideshow"><div style="width: 10 0%; height: 100%; position: relative; overflow: hidden;"><div style="backgroundcolor: rgb(0, 0, 0); height: 25px; top: 115px; width: 100%; z-index: 222; positi on: relative; text-align: center; direction: ltr; padding-top: 5px; padding-bott om: 5px; visibility: hidden;"><img src="./IBanta.Blogspot.com Codility Demo Sol ution 100%_files/btn_prev_small.png" style="cursor: pointer;"><img src="./IBanta .Blogspot.com Codility Demo Solution 100%_files/btn_pause_small.png" style="cur sor: pointer; margin-left: 5px; margin-right: 5px;"><img src="./IBanta.Blogspot. com Codility Demo Solution 100%_files/btn_next_small.png" style="cursor: pointe r;"></div><a href="https://picasaweb.google.com/100624365318786299808/CarsMyPass ion?authkey=KdKz4yHNjPY#5163156608761676674" target="_self"><img style="position : absolute; visibility: hidden; opacity: 0; width: 150px; height: 113px; top: 19 px; left: 0px;" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/Ac ura%2520Advanced%2520Sports%2520Car%2520Concept%252001.jpg"></a><a href="https:/ /picasaweb.google.com/100921279431980005526/LOTUSELANINILLUSTRATEDMAGAZINEIN1991 ?authkey=wYQUhy1AVuw#5161488172472278338" target="_self"><img style="position: a bsolute; visibility: hidden; opacity: 0; height: 150px; width: 107px; top: 0px; left: 22px;" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/SPORT S%2520CARS%2520PAGE%25201.jpg"></a><a href="https://picasaweb.google.com/1160311 85985794942112/Supercars_and_concept_cars?authkey=ECpkNNm1Uw4#531185677223690603 4" target="_self"><img style="position: absolute; visibility: visible; opacity: 0.39599999999999963; width: 150px; height: 113px; top: 19px; left: 0px;" src="./ IBanta.Blogspot.com Codility Demo Solution 100%_files/Acura%2520Advanced%2520Sp orts%2520Car%2520Concept%252002.jpg"></a><a href="https://picasaweb.google.com/1 15875696364290922029/ALMKAlbum?authkey=1oEhFK1BbIg#5206085929284147330" target=" _self"><img style="position: absolute; visibility: visible; opacity: 0.604; widt h: 150px; height: 97px; top: 27px; left: 0px;" src="./IBanta.Blogspot.com Codil ity Demo Solution 100%_files/2006-Land-Rover-Range-Rover-Sport-Pace-Car-by-Proje

ct-Kahn-Sporty-SUV-on-22s-B-full.jpg"></a><a href="https://picasaweb.google.com/ 115443014258212565584/PicCars?authkey=uoqx6RlVngU#5272692072143271650" target="_ self"><img style="position: absolute; visibility: hidden; opacity: 0; width: 150 px; height: 113px; top: 19px; left: 0px;" src="./IBanta.Blogspot.com Codility D emo Solution 100%_files/dodge%2520-%2520viper%2520-%2520wallpapers%2520-%2520spo rts%2520cars%2520-%2520viper%2520concept%2520car.jpg"></a><a href="https://picas aweb.google.com/109639990064155650002/Kotse?authkey=yvaO5zuWO9A#5273262176772182 450" target="_self"><img style="position: absolute; visibility: hidden; opacity: 0; width: 150px; height: 113px; top: 19px; left: 0px;" src="./IBanta.Blogspot.c om Codility Demo Solution 100%_files/toyota-ft-hs-hybrid-sports-car-concept-6.j pg"></a><a href="https://picasaweb.google.com/112541171746110131422/Cars?authkey =ktdjyYxQRTg#5302285754719913778" target="_self"><img style="position: absolute; visibility: hidden; opacity: 0; width: 150px; height: 113px; top: 19px; left: 0 px;" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/Acura%2520Adv anced%2520Sports%2520Car%2520Concept%252003.jpg"></a><a href="https://picasaweb. google.com/115875696364290922029/ALMKAlbum?authkey=1oEhFK1BbIg#52060859507589838 26" target="_self"><img style="position: absolute; visibility: hidden; opacity: 0; width: 150px; height: 113px; top: 19px; left: 0px;" src="./IBanta.Blogspot.co m Codility Demo Solution 100%_files/2006-Land-Rover-Range-Rover-Sport-Pace-Carby-Project-Kahn-Sporty-SUV-on-22s-A-full.jpg"></a><a href="https://picasaweb.goo gle.com/antoniopatruno95/ILoveFerrariLamborghiniAlfaRomeoMaserati?authkey=lA9UUq l6PSg#5240609660482832754" target="_self"><img style="position: absolute; visibi lity: hidden; opacity: 0; width: 150px; height: 113px; top: 19px; left: 0px;" sr c="./IBanta.Blogspot.com Codility Demo Solution 100%_files/Cars%2520-%25202008% 2520Maserati%2520Quattroporte%2520Sport%2520GT%2520S.jpg"></a><a href="https://p icasaweb.google.com/antoniopatruno95/ILoveFerrariLamborghiniAlfaRomeoMaserati?au thkey=lA9UUql6PSg#5240609459923267074" target="_self"><img style="position: abso lute; visibility: hidden; opacity: 0; width: 150px; height: 113px; top: 19px; le ft: 0px;" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/Cars%252 0-%25202006%2520Maserati%2520Gran%2520Sport%2520MC%2520Victory.jpg"></a><a href= "https://picasaweb.google.com/112541171746110131422/Cars?authkey=ktdjyYxQRTg#530 2285519253707154" target="_self"><img style="position: absolute; visibility: hid den; opacity: 0; width: 150px; height: 113px; top: 19px; left: 0px;" src="./IBan ta.Blogspot.com Codility Demo Solution 100%_files/Acura%2520Advanced%2520Sports %2520Car%2520Concept%252001(1).jpg"></a><a href="https://picasaweb.google.com/an toniopatruno95/ILoveFerrariLamborghiniAlfaRomeoMaserati?authkey=lA9UUql6PSg#5240 610029793559810" target="_self"><img style="position: absolute; visibility: hidd en; opacity: 0; width: 150px; height: 108px; top: 21px; left: 0px;" src="./IBant a.Blogspot.com Codility Demo Solution 100%_files/Cars%2520-%2520Alfaromeo%2520S port%252002.jpg"></a><a href="https://picasaweb.google.com/109780013332840028568 /Ridez02?authkey=VTBbIszymbE#5247538008742358930" target="_self"><img style="pos ition: absolute; visibility: hidden; opacity: 0; width: 150px; height: 113px; to p: 19px; left: 0px;" src="./IBanta.Blogspot.com Codility Demo Solution 100%_fil es/project-kahn-range-rover-sport-pace-car-8430.jpg"></a><a href="https://picasa web.google.com/109985151438734210812/AmazingVideos?authkey=3nGK-PZbVak#541104009 2504182642" target="_self"><img style="position: absolute; visibility: hidden; o pacity: 0; width: 150px; height: 112px; top: 19px; left: 0px;" src="./IBanta.Blo gspot.com Codility Demo Solution 100%_files/SPORTS%2520CAR%2520PARKING.jpg"></a ><a href="https://picasaweb.google.com/106357409058695623875/BoysCards?authkey=k PX8Nv_939o#5295582960619436722" target="_self"><img style="position: absolute; v isibility: hidden; opacity: 0; width: 150px; height: 113px; top: 19px; left: 0px ;" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/sports-car-1.jp g"></a><a href="https://picasaweb.google.com/100239477145221525267/Cars?authkey= toFnzvNYPW8#5432570451155185010" target="_self"><img style="position: absolute; visibility: hidden; opacity: 0; width: 150px; height: 113px; top: 19px; left: 0p x;" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/Acura%2520Adva nced%2520Sports%2520Car%2520Concept%252001(2).jpg"></a><a href="https://picasawe b.google.com/116031185985794942112/Supercars_and_concept_cars?authkey=ECpkNNm1Uw 4#5311856866819192066" target="_self"><img style="position: absolute; visibility : hidden; opacity: 0; width: 150px; height: 113px; top: 19px; left: 0px;" src=".

/IBanta.Blogspot.com Codility Demo Solution 100%_files/Acura%2520Advanced%2520S ports%2520Car%2520Concept%252003(1).jpg"></a><a href="https://picasaweb.google.c om/104165545078455467493/VisitFromJasperToVancouver?authkey=Y3VKv70ALnA#52492974 03932880146" target="_self"><img style="position: absolute; visibility: hidden; opacity: 0; height: 150px; width: 113px; top: 0px; left: 19px;" src="./IBanta.Bl ogspot.com Codility Demo Solution 100%_files/all%2520sports%2520cars%2520of%252 0rerrari%2520%2526%2520lumbargini%2520%2526%2520snow%2520mountain%2520in%2520jas pe%2520139.jpg"></a><a href="https://picasaweb.google.com/Darryl.Wilson1/MyPictu res02?authkey=b_LQi4t03xI#5157833312913845474" target="_self"><img style="positi on: absolute; visibility: hidden; opacity: 0; width: 150px; height: 113px; top: 19px; left: 0px;" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/ Acura%2520Advanced%2520Sports%2520Car%2520Concept%252002(1).jpg"></a><a href="ht tps://picasaweb.google.com/110292979946071709569/Jaguar?authkey=m61201iCiB4#5161 938140739135522" target="_self"><img style="position: absolute; visibility: hidd en; opacity: 0; width: 150px; height: 66px; top: 42px; left: 0px;" src="./IBanta .Blogspot.com Codility Demo Solution 100%_files/Jaguar%2520XK%2520-%2520Sports% 2520car%2520%2526Convertible.jpg"></a></div></div> </div> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=Slideshow&widgetId=Slideshow1&action=editWidget&sectionId=side bar-right-1" onclick="return _WidgetManager._PopupConfig(document.getElementById (&quot;Slideshow1&quot;));" target="configSlideshow1" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div> <div class="widget Label" id="Label1"> <h2>Categories</h2> <div class="widget-content list-label-widget-content"> <ul> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/%27SECRET%27%20OF%20CH ANGE">'SECRET' OF CHANGE</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/BASIC">BASIC</a> <span dir="ltr">(2)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Canvas%20Rider%20On%20 Firefox%20or%20Internet%20Explorer">Canvas Rider On Firefox or Internet Explorer </a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Codejam">Codejam</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Codility">Codility</a> <span dir="ltr">(2)</span> </li> <li>

<a dir="ltr" href="http://ibanta.blogspot.in/search/label/Codility%20Solutions"> Codility Solutions</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Codility%20Tast">Codil ity Tast</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Gambas">Gambas</a> <span dir="ltr">(2)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/gambus">gambus</a> <span dir="ltr">(2)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Hibernation%20in%20lin ux">Hibernation in linux</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Hibernation%20in%20ubu ntu%2012.04">Hibernation in ubuntu 12.04</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/http%3A%2F%2FJemrails. tk">http://Jemrails.tk</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Install%20Gambas">Inst all Gambas</a> <span dir="ltr">(2)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Install%20Rails">Insta ll Rails</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Install%20Ruby">Instal l Ruby</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Install%20Ruby%20on%20 T%3DRails">Install Ruby on T=Rails</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Install%20RVM">Install RVM</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Install%20RVM%20in%20u buntu">Install RVM in ubuntu</a>

<span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/POWER%20BEHIND%20OUR%2 0THOUGHTS">POWER BEHIND OUR THOUGHTS</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/prefix_set">prefix_set </a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/prefix_set%20solution" >prefix_set solution</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Problem%3A%20Ubuntu%20 hibernation">Problem: Ubuntu hibernation</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Remove%20gambas">Remov e gambas</a> <span dir="ltr">(2)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/RoR">RoR</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Ruby">Ruby</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Ruby%20on%20Rails">Rub y on Rails</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/RVM">RVM</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Ubuntu">Ubuntu</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Ubuntu%2012.04">Ubuntu 12.04</a> <span dir="ltr">(1)</span> </li> <li> <a dir="ltr" href="http://ibanta.blogspot.in/search/label/Ubuntu%20hibernation"> Ubuntu hibernation</a> <span dir="ltr">(1)</span> </li> </ul> <div class="clear"></div>

<span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=Label&widgetId=Label1&action=editWidget&sectionId=sidebar-righ t-1" onclick="return _WidgetManager._PopupConfig(document.getElementById(&quot;L abel1&quot;));" target="configLabel1" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div> </div><div class="widget HTML" id="HTML2"> <h2 class="title">Links</h2> <div class="widget-content"> </div> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=HTML&widgetId=HTML2&action=editWidget&sectionId=sidebar-right1" onclick="return _WidgetManager._PopupConfig(document.getElementById(&quot;HTM L2&quot;));" target="configHTML2" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div><div class="widget HTML" id="HTML1"> <h2 class="title">Site Sponsors</h2> <div class="widget-content"> <!-- Facebook Badge START --><a style="font-family: &quot;lucida grande&quot;,ta homa,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style : normal; font-weight: normal; color: #3B5998; text-decoration: none;" href="htt p://en-gb.facebook.com/bbanta1" target="_TOP" title="Bernard Banta">Bernard Bant a</a><br><a href="http://en-gb.facebook.com/bbanta1" target="_TOP" title="Bernar d Banta"><img width="120" style="border: 0px;" src="./IBanta.Blogspot.com Codil ity Demo Solution 100%_files/1220837608.1151.420045366.png" height="268"></a><br ><a style="font-family: &quot;lucida grande&quot;,tahoma,verdana,arial,sans-seri f; font-size: 11px; font-variant: normal; font-style: normal; font-weight: norma l; color: #3B5998; text-decoration: none;" href="http://en-gb.facebook.com/faceb ook-widgets/" target="_TOP" title="Make your own badge!">Create your badge</a><! -- Facebook Badge END --> </div> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=HTML&widgetId=HTML1&action=editWidget&sectionId=sidebar-right1" onclick="return _WidgetManager._PopupConfig(document.getElementById(&quot;HTM L1&quot;));" target="configHTML1" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div><div class="widget HTML" id="HTML3">

<h2 class="title">Feeds</h2> <div class="widget-content"> </div> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=HTML&widgetId=HTML3&action=editWidget&sectionId=sidebar-right1" onclick="return _WidgetManager._PopupConfig(document.getElementById(&quot;HTM L3&quot;));" target="configHTML3" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div><div class="widget AdSense" id="AdSense1"> <div class="widget-content"> <script type="text/javascript"><!-google_ad_client="pub-7069464999496285"; google_ad_host="pub-1556223355139109"; google_ad_host_channel="00000"; google_ad_width=160; google_ad_height=600; google_ad_format="160x600_as"; google_ad_type="text_image"; google_color_border="FFFFFF"; google_color_bg="FFFFFF"; google_color_link="225588"; google_color_url="225588"; google_color_text="333333"; //--></script> <script type="text/javascript" src="./IBanta.Blogspot.com Codility Demo Solutio n 100%_files/show_ads.js"> </script><ins style="display:inline-table;border:none;height:600px;margin:0;padd ing:0;position:relative;visibility:visible;width:160px"><ins id="aswift_1_anchor " style="display:block;border:none;height:600px;margin:0;padding:0;position:rela tive;visibility:visible;width:160px"><iframe width="160" height="600" frameborde r="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency=" true" scrolling="no" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp ;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch (e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeo ut(h,0)}else if(h.match){w.location.replace(h)}}" id="aswift_1" name="aswift_1" style="left:0;position:absolute;top:0;"></iframe></ins></ins> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=AdSense&widgetId=AdSense1&action=editWidget&sectionId=sidebarright-1" onclick="return _WidgetManager._PopupConfig(document.getElementById(&qu ot;AdSense1&quot;));" target="configAdSense1" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div> </div><div class="widget Subscribe" id="Subscribe1"> <div style="white-space:nowrap">

<h2 class="title">Subscribe To IBanta</h2> <div class="widget-content"> <div class="subscribe-wrapper subscribe-type-POST"> <div class="subscribe expanded subscribe-type-POST" id="SW_READER_LIST_Subscribe 1POST" style="display:none;"> <div class="top"> <span class="inner" onclick="return(_SW_toggleReaderList(event, &quot;Subscribe1 POST&quot;));"> <img class="subscribe-dropdown-arrow" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/arrow_dropdown.gif"> <img align="absmiddle" alt="" border="0" class="feed-icon" src="./IBanta.Blogspo t.com Codility Demo Solution 100%_files/icon_feed12.png"> Posts </span> <div class="feed-reader-links"> <a class="feed-reader-link" href="http://www.netvibes.com/subscribe.php?url=http %3A%2F%2Fibanta.blogspot.com%2Ffeeds%2Fposts%2Fdefault" target="_blank"> <img src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/subscribe-net vibes.png"> </a> <a class="feed-reader-link" href="http://add.my.yahoo.com/content?url=http%3A%2F %2Fibanta.blogspot.com%2Ffeeds%2Fposts%2Fdefault" target="_blank"> <img src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/subscribe-yah oo.png"> </a> <a class="feed-reader-link" href="http://ibanta.blogspot.com/feeds/posts/default " target="_blank"> <img align="absmiddle" class="feed-icon" src="./IBanta.Blogspot.com Codility De mo Solution 100%_files/icon_feed12.png"> Atom </a> </div> </div> <div class="bottom"></div> </div> <div class="subscribe" id="SW_READER_LIST_CLOSED_Subscribe1POST" onclick="return (_SW_toggleReaderList(event, &quot;Subscribe1POST&quot;));"> <div class="top"> <span class="inner"> <img class="subscribe-dropdown-arrow" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/arrow_dropdown.gif"> <span onclick="return(_SW_toggleReaderList(event, &quot;Subscribe1POST&quot;));" > <img align="absmiddle" alt="" border="0" class="feed-icon" src="./IBanta.Blogspo t.com Codility Demo Solution 100%_files/icon_feed12.png"> Posts </span> </span> </div> <div class="bottom"></div> </div> </div> <div class="subscribe-wrapper subscribe-type-PER_POST"> <div class="subscribe expanded subscribe-type-PER_POST" id="SW_READER_LIST_Subsc ribe1PER_POST" style="display:none;"> <div class="top"> <span class="inner" onclick="return(_SW_toggleReaderList(event, &quot;Subscribe1 PER_POST&quot;));"> <img class="subscribe-dropdown-arrow" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/arrow_dropdown.gif">

<img align="absmiddle" alt="" border="0" class="feed-icon" src="./IBanta.Blogspo t.com Codility Demo Solution 100%_files/icon_feed12.png"> Comments </span> <div class="feed-reader-links"> <a class="feed-reader-link" href="http://www.netvibes.com/subscribe.php?url=http %3A%2F%2Fibanta.blogspot.com%2Ffeeds%2F377012569112191370%2Fcomments%2Fdefault" target="_blank"> <img src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/subscribe-net vibes.png"> </a> <a class="feed-reader-link" href="http://add.my.yahoo.com/content?url=http%3A%2F %2Fibanta.blogspot.com%2Ffeeds%2F377012569112191370%2Fcomments%2Fdefault" target ="_blank"> <img src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/subscribe-yah oo.png"> </a> <a class="feed-reader-link" href="http://ibanta.blogspot.com/feeds/3770125691121 91370/comments/default" target="_blank"> <img align="absmiddle" class="feed-icon" src="./IBanta.Blogspot.com Codility De mo Solution 100%_files/icon_feed12.png"> Atom </a> </div> </div> <div class="bottom"></div> </div> <div class="subscribe" id="SW_READER_LIST_CLOSED_Subscribe1PER_POST" onclick="re turn(_SW_toggleReaderList(event, &quot;Subscribe1PER_POST&quot;));"> <div class="top"> <span class="inner"> <img class="subscribe-dropdown-arrow" src="./IBanta.Blogspot.com Codility Demo Solution 100%_files/arrow_dropdown.gif"> <span onclick="return(_SW_toggleReaderList(event, &quot;Subscribe1PER_POST&quot; ));"> <img align="absmiddle" alt="" border="0" class="feed-icon" src="./IBanta.Blogspo t.com Codility Demo Solution 100%_files/icon_feed12.png"> Comments </span> </span> </div> <div class="bottom"></div> </div> </div> <div style="clear:both"></div> </div> </div> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=Subscribe&widgetId=Subscribe1&action=editWidget&sectionId=side bar-right-1" onclick="return _WidgetManager._PopupConfig(document.getElementById (&quot;Subscribe1&quot;));" target="configSubscribe1" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div>

</div><div class="widget PageList" id="PageList1"> <h2>Pages</h2> <div class="widget-content"> <ul> <li><a href="http://ibanta.blogspot.in/">Home</a></li> <li><a href="http://ibanta.blogspot.in/p/entertainment.html">Entertainment</a></ li> </ul> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=PageList&widgetId=PageList1&action=editWidget&sectionId=sideba r-right-1" onclick="return _WidgetManager._PopupConfig(document.getElementById(& quot;PageList1&quot;));" target="configPageList1" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div> </div><div class="widget Profile" id="Profile1" style=""> <h2>Web Design</h2> <div class="widget-content"> <a href="http://www.blogger.com/profile/11217750836776573004"><img alt="My Photo " class="profile-img" height="60" src="./IBanta.Blogspot.com Codility Demo Solu tion 100%_files/2012-05-07-134211.jpg" width="80"></a> <dl class="profile-datablock"> <dt class="profile-data"> <a class="profile-name-link g-profile" href="http://www.blogger.com/profile/1121 7750836776573004" rel="author" style="background-image: url(//www.blogger.com/im g/logo-16.png);"> www.blogspot.ibanta.com </a> </dt> <dd class="profile-textblock">This is a blog that talks about life experiences s tories and how to make our lifes better. We welcome comments from our user with a lot of honour. Contact: banta.bernard@gmail.com banta1@hotmail.com</dd> </dl> <a class="profile-link" href="http://www.blogger.com/profile/1121775083677657300 4" rel="author">View my complete profile</a> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=Profile&widgetId=Profile1&action=editWidget&sectionId=sidebarright-1" onclick="return _WidgetManager._PopupConfig(document.getElementById(&qu ot;Profile1&quot;));" target="configProfile1" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span>

<div class="clear"></div> </div> </div><div class="widget Followers" id="Followers1"> <h2 class="title">Followers</h2> <div class="widget-content"> <div id="Followers1-wrapper"> <div style="margin-right:2px;"> <script type="text/javascript"> if (!window.google || !google.friendconnect) { document.write('<script type="text/javascript"' + 'src="http://www.google.com/friendconnect/script/friendconnect.js" >' + '</scr' + 'ipt>'); } </script> <script type="text/javascript"> if (!window.registeredBloggerCallbacks) { window.registeredBloggerCallbacks = true;

gadgets.rpc.register('requestReload', function() { document.location.reload(); }); gadgets.rpc.register('requestSignOut', function(siteId) { google.friendconnect.container.openSocialSiteId = siteId; google.friendconnect.requestSignOut(); }); } </script> <script type="text/javascript"> function registerGetBlogUrls() { gadgets.rpc.register('getBlogUrls', function() { var holder = {};

holder.currentPost = "http://www.blogger.com/feeds/189165064921255 0830/posts/default/377012569112191370";

holder.currentComments = "http://www.blogger.com/feeds/18916506492 12550830/377012569112191370/comments/default"; holder.currentPostUrl = ""; holder.currentPostId = 377012569112191370

holder.postFeed = "http://www.blogger.com/feeds/1891650649212550830/ posts/default";

holder.commentFeed = "http://www.blogger.com/feeds/18916506492125508 30/comments/default"; holder.currentBlogUrl = "http://ibanta.blogspot.com/"; holder.currentBlogId = "1891650649212550830"; return holder; }); } </script> <script type="text/javascript"> if (!window.registeredCommonBloggerCallbacks) { window.registeredCommonBloggerCallbacks = true; gadgets.rpc.register('resize_iframe', function(height) { var el = document.getElementById(this['f']); if (el) { el.style.height = height + 'px'; } }); gadgets.rpc.register('set_pref', function() {}); registerGetBlogUrls(); } </script> <div id="div-nhhi8ftr8y6y" style="width: 100%; visibility: visible;" class="gadg ets-gadget-container"><div id="gfc_iframe_887892231_1_body"><iframe id="gfc_ifra me_887892231_1" name="gfc_iframe_887892231_1" style="width: 100%; height: 176px; " frameborder="0" scrolling="no" allowtransparency="true" height="260"></iframe> </div></div> <script type="text/javascript"> var skin = {}; skin['FACE_SIZE'] = '32'; skin['HEIGHT'] = "260"; skin['TITLE'] = "Followers"; skin['BORDER_COLOR'] = "transparent"; skin['ENDCAP_BG_COLOR'] = "transparent"; skin['ENDCAP_TEXT_COLOR'] = "#222222"; skin['ENDCAP_LINK_COLOR'] = "#2288bb"; skin['ALTERNATE_BG_COLOR'] = "transparent"; skin['CONTENT_BG_COLOR'] = "transparent"; skin['CONTENT_LINK_COLOR'] = "#2288bb"; skin['CONTENT_TEXT_COLOR'] = "#222222"; skin['CONTENT_SECONDARY_LINK_COLOR'] = "#2288bb"; skin['CONTENT_SECONDARY_TEXT_COLOR'] = "#999999"; skin['CONTENT_HEADLINE_COLOR'] = "#000000"; skin['FONT_FACE'] = "normal normal 12px Arial, Tahoma, Helvetica, FreeSans, sans-serif"; google.friendconnect.container.setParentUrl("/"); google.friendconnect.container["renderMembersGadget"]( {id: "div-nhhi8ftr8y6y", height: 260,

site: "07626551612341026068",

locale: 'en' }, skin); </script> </div> </div> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=Followers&widgetId=Followers1&action=editWidget&sectionId=side bar-right-1" onclick="return _WidgetManager._PopupConfig(document.getElementById (&quot;Followers1&quot;));" target="configFollowers1" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div> </div><div class="widget BlogArchive" id="BlogArchive1"> <h2>Blog Archive</h2> <div class="widget-content"> <div id="ArchiveList"> <div id="BlogArchive1_ArchiveList"> <ul class="hierarchy"> <li class="archivedate expanded"> <a class="toggle" href="javascript:void(0)"> <span class="zippy toggle-open">&nbsp;</span> </a> <a class="post-count-link" href="http://ibanta.blogspot.in/search?updated-min=20 12-01-01T00:00:00-08:00&updated-max=2013-01-01T00:00:00-08:00&max-results=8">201 2</a> <span class="post-count" dir="ltr">(8)</span> <ul class="hierarchy"> <li class="archivedate collapsed"> <a class="toggle" href="javascript:void(0)"> <span class="zippy"> &nbsp; </span> </a> <a class="post-count-link" href="http://ibanta.blogspot.in/2012_05_01_archive.ht ml">May</a> <span class="post-count" dir="ltr">(2)</span> </li> </ul> <ul class="hierarchy"> <li class="archivedate collapsed"> <a class="toggle" href="javascript:void(0)"> <span class="zippy"> &nbsp; </span> </a> <a class="post-count-link" href="http://ibanta.blogspot.in/2012_04_01_archive.ht ml">April</a> <span class="post-count" dir="ltr">(4)</span>

</li> </ul> <ul class="hierarchy"> <li class="archivedate expanded"> <a class="toggle" href="javascript:void(0)"> <span class="zippy toggle-open">&nbsp;</span> </a> <a class="post-count-link" href="http://ibanta.blogspot.in/2012_02_01_archive.ht ml">February</a> <span class="post-count" dir="ltr">(2)</span> <ul class="posts"> <li><a href="http://ibanta.blogspot.in/2012/02/codility-prefixset-solution-100.h tml">Codility prefix_set Solution 100%</a></li> <li><a href="./IBanta.Blogspot.com Codility Demo Solution 100%_files/IBanta.Blo gspot.com Codility Demo Solution 100%.htm">Codility Demo Solution 100%</a></li> </ul> </li> </ul> </li> </ul> <ul class="hierarchy"> <li class="archivedate collapsed"> <a class="toggle" href="javascript:void(0)"> <span class="zippy"> &nbsp; </span> </a> <a class="post-count-link" href="http://ibanta.blogspot.in/search?updated-min=20 10-01-01T00:00:00-08:00&updated-max=2011-01-01T00:00:00-08:00&max-results=1">201 0</a> <span class="post-count" dir="ltr">(1)</span> <ul class="hierarchy"> <li class="archivedate collapsed"> <a class="toggle" href="javascript:void(0)"> <span class="zippy"> &nbsp; </span> </a> <a class="post-count-link" href="http://ibanta.blogspot.in/2010_02_01_archive.ht ml">February</a> <span class="post-count" dir="ltr">(1)</span> </li> </ul> </li> </ul> <ul class="hierarchy"> <li class="archivedate collapsed"> <a class="toggle" href="javascript:void(0)"> <span class="zippy"> &nbsp; </span> </a> <a class="post-count-link" href="http://ibanta.blogspot.in/search?updated-min=20 09-01-01T00:00:00-08:00&updated-max=2010-01-01T00:00:00-08:00&max-results=2">200

9</a> <span class="post-count" dir="ltr">(2)</span> <ul class="hierarchy"> <li class="archivedate collapsed"> <a class="toggle" href="javascript:void(0)"> <span class="zippy"> &nbsp; </span> </a> <a class="post-count-link" href="http://ibanta.blogspot.in/2009_10_01_archive.ht ml">October</a> <span class="post-count" dir="ltr">(2)</span> </li> </ul> </li> </ul> </div> </div> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=BlogArchive&widgetId=BlogArchive1&action=editWidget&sectionId= sidebar-right-1" onclick="return _WidgetManager._PopupConfig(document.getElement ById(&quot;BlogArchive1&quot;));" target="configBlogArchive1" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div> </div><div class="widget Gadget" id="Gadget1"> <h2 class="title">Please share it with others</h2> <script type="text/javascript"> if (!window.google || !google.friendconnect) { document.write('<script type="text/javascript"' + 'src="http://www.google.com/friendconnect/script/friendconnect.js" >' + '</scr' + 'ipt>'); } </script> <script type="text/javascript"> if (!window.registeredBloggerCallbacks) { window.registeredBloggerCallbacks = true;

gadgets.rpc.register('requestReload', function() { document.location.reload(); }); gadgets.rpc.register('requestSignOut', function(siteId) { google.friendconnect.container.openSocialSiteId = siteId; google.friendconnect.requestSignOut();

}); } </script> <script type="text/javascript"> function registerGetBlogUrls() { gadgets.rpc.register('getBlogUrls', function() { var holder = {};

holder.currentPost = "http://www.blogger.com/feeds/189165064921255 0830/posts/default/377012569112191370";

holder.currentComments = "http://www.blogger.com/feeds/18916506492 12550830/377012569112191370/comments/default"; holder.currentPostUrl = ""; holder.currentPostId = 377012569112191370

holder.postFeed = "http://www.blogger.com/feeds/1891650649212550830/ posts/default";

holder.commentFeed = "http://www.blogger.com/feeds/18916506492125508 30/comments/default"; holder.currentBlogUrl = "http://ibanta.blogspot.com/"; holder.currentBlogId = "1891650649212550830"; return holder; }); } </script> <script type="text/javascript"> if (!window.registeredCommonBloggerCallbacks) { window.registeredCommonBloggerCallbacks = true; gadgets.rpc.register('resize_iframe', function(height) { var el = document.getElementById(this['f']); if (el) { el.style.height = height + 'px'; } }); gadgets.rpc.register('set_pref', function() {}); registerGetBlogUrls(); } </script> <div id="div-khkhdz79s9ii" style="width: 100%; visibility: visible;" class="gadg ets-gadget-container"><div id="gfc_iframe_326085203_2_body"><iframe id="gfc_ifra me_326085203_2" name="gfc_iframe_326085203_2" style="width: 100%; height: 92px;"

frameborder="0" scrolling="no" allowtransparency="true" height="200"></iframe>< /div></div> <script type="text/javascript"> var skin = {}; skin['FACE_SIZE'] = '32'; skin['HEIGHT'] = "200"; skin['TITLE'] = "Please share it with others"; skin['BORDER_COLOR'] = "transparent"; skin['ENDCAP_BG_COLOR'] = "transparent"; skin['ENDCAP_TEXT_COLOR'] = "#222222"; skin['ENDCAP_LINK_COLOR'] = "#2288bb"; skin['ALTERNATE_BG_COLOR'] = "transparent"; skin['CONTENT_BG_COLOR'] = "transparent"; skin['CONTENT_LINK_COLOR'] = "#2288bb"; skin['CONTENT_TEXT_COLOR'] = "#222222"; skin['CONTENT_SECONDARY_LINK_COLOR'] = "#2288bb"; skin['CONTENT_SECONDARY_TEXT_COLOR'] = "#999999"; skin['CONTENT_HEADLINE_COLOR'] = "#000000"; skin['FONT_FACE'] = "normal normal 12px Arial, Tahoma, Helvetica, FreeSans, sans-serif"; google.friendconnect.container.setParentUrl("/"); google.friendconnect.container["renderOpenSocialGadget"]( {id: "div-khkhdz79s9ii", height: 200, url: "http://fcgadgets.appspot.com/spec/shareit.xml", "view-params": {}, "prefs": {}, site: "07626551612341026068", locale: 'en' }, skin); </script> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=Gadget&widgetId=Gadget1&action=editWidget&sectionId=sidebar-ri ght-1" onclick="return _WidgetManager._PopupConfig(document.getElementById(&quot ;Gadget1&quot;));" target="configGadget1" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div><div class="widget CustomSearch" id="CustomSearch1"> <h2 class="title">Search</h2> <div class="widget-content"> <div id="CustomSearch1_form"><form class="gsc-search-box" accept-charset="utf-8" ><table cellspacing="0" cellpadding="0" class="gsc-search-box"><tbody><tr><td cl ass="gsc-input"><input autocomplete="off" type="text" size="10" class=" gsc-inpu t" name="search" title="search"></td><td class="gsc-search-button"><input type=" submit" value="Search" class="gsc-search-button" title="search"></td></tr></tbod

y></table><table cellspacing="0" cellpadding="0" class="gsc-branding"><tbody><tr style="display: none;"><td class="gsc-branding-user-defined"></td><td class="gs c-branding-text"><div class="gsc-branding-text">powered by</div></td><td class=" gsc-branding-img-noclear"><img src="./IBanta.Blogspot.com Codility Demo Solutio n 100%_files/small-logo.png" class="gsc-branding-img-noclear"></td></tr></tbody> </table></form></div> </div> <style type="text/css"> #uds-searchControl .gs-result .gs-title, #uds-searchControl .gs-result .gs-title *, #uds-searchControl .gsc-results .gsc-trailing-more-results, #uds-searchControl .gsc-results .gsc-trailing-more-results * { color:#2288bb; } #uds-searchControl .gs-result .gs-title a:visited, #uds-searchControl .gs-result .gs-title a:visited * { color:#888888; } #uds-searchControl .gs-relativePublishedDate, #uds-searchControl .gs-publishedDate { color: #777777; } #uds-searchControl .gs-result a.gs-visibleUrl, #uds-searchControl .gs-result .gs-visibleUrl { color: #2288bb; } #uds-searchControl .gsc-results { border-color: #eeeeee; background-color: #ffffff; } #uds-searchControl .gsc-tabhActive { border-color: #eeeeee; border-top-color: #eeeeee; background-color: #ffffff; color: #222222; } #uds-searchControl .gsc-tabhInactive { border-color: #eeeeee; background-color: transparent; color: #2288bb; } #uds-searchClearResults { border-color: #eeeeee; } #uds-searchClearResults:hover { border-color: #eeeeee; } #uds-searchControl .gsc-cursor-page { color: #2288bb; }

#uds-searchControl .gsc-cursor-current-page { color: #222222; } </style> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=CustomSearch&widgetId=CustomSearch1&action=editWidget&sectionI d=sidebar-right-1" onclick="return _WidgetManager._PopupConfig(document.getEleme ntById(&quot;CustomSearch1&quot;));" target="configCustomSearch1" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div></div> <table border="0" cellpadding="0" cellspacing="0" class="section-columns columns -2"> <tbody> <tr> <td class="first columns-cell"> <div class="sidebar section" id="sidebar-right-2-1"> </div> </td> <td class="columns-cell"> <div class="sidebar section" id="sidebar-right-2-2"><div class="widget Text" id= "Text99"> <h2 class="title">Copyright Text</h2> <div class="widget-content"> </div> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=Text&widgetId=Text99&action=editWidget&sectionId=sidebar-right -2-2" onclick="return _WidgetManager._PopupConfig(document.getElementById(&quot; Text99&quot;));" target="configText99" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div></div> </td> </tr> </tbody> </table> <div class="sidebar section" id="sidebar-right-3"><div class="widget Gadget" id= "Gadget5"> There was an error in this gadget <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=Gadget&widgetId=Gadget5&action=editWidget&sectionId=sidebar-ri ght-3" onclick="return _WidgetManager._PopupConfig(document.getElementById(&quot ;Gadget5&quot;));" target="configGadget5" title="Edit">

<img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_ files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div></div> </aside> </div> </div> </div> <div style="clear: both"></div> <!-- columns --> </div> <!-- main --> </div> </div> <div class="main-cap-bottom cap-bottom"> <div class="cap-left"></div> <div class="cap-right"></div> </div> </div> <footer> <div class="footer-outer"> <div class="footer-cap-top cap-top"> <div class="cap-left"></div> <div class="cap-right"></div> </div> <div class="fauxborder-left footer-fauxborder-left"> <div class="fauxborder-right footer-fauxborder-right"></div> <div class="region-inner footer-inner"> <div class="foot section" id="footer-1"></div> <table border="0" cellpadding="0" cellspacing="0" class="section-columns columns -2"> <tbody> <tr> <td class="first columns-cell"> <div class="foot section" id="footer-2-1"></div> </td> <td class="columns-cell"> <div class="foot section" id="footer-2-2"></div> </td> </tr> </tbody> </table> <!-- outside of the include in order to lock Attribution widget --> <div class="foot section" id="footer-3"><div class="widget Attribution" id="Attr ibution1"> <div class="widget-content" style="text-align: center;"> Simple template. Powered by <a href="http://www.blogger.com/" target="_blank">Bl ogger</a>. </div> <div class="clear"></div> <span class="widget-item-control"> <span class="item-control blog-admin"> <a class="quickedit" href="http://www.blogger.com/rearrange?blogID=1891650649212 550830&widgetType=Attribution&widgetId=Attribution1&action=editWidget&sectionId= footer-3" onclick="return _WidgetManager._PopupConfig(document.getElementById(&q uot;Attribution1&quot;));" target="configAttribution1" title="Edit"> <img alt="" height="18" src="./IBanta.Blogspot.com Codility Demo Solution 100%_

files/icon18_wrench_allbkg.png" width="18"> </a> </span> </span> <div class="clear"></div> </div></div> </div> </div> <div class="footer-cap-bottom cap-bottom"> <div class="cap-left"></div> <div class="cap-right"></div> </div> </div> </footer> <!-- content --> </div> </div> <div class="content-cap-bottom cap-bottom"> <div class="cap-left"></div> <div class="cap-right"></div> </div> </div> </div><iframe frameborder="0" id="google_top_static_frame" name="google_top_stat ic_frame" style="height: 0px; width: 0px; position: absolute;" src="./IBanta.Blo gspot.com Codility Demo Solution 100%_files/blank.htm"></iframe> <script type="text/javascript"> window.setTimeout(function() { document.body.className = document.body.className.replace('loading', '') ; }, 10); </script> <script type="text/javascript"> if (window.jstiming) window.jstiming.load.tick('widgetJsBefore'); </script><script type="text/javascript" src="./IBanta.Blogspot.com Codility Dem o Solution 100%_files/3768658763-widgets.js"></script> <script type="text/javascript" src="./IBanta.Blogspot.com Codility Demo Solutio n 100%_files/plusone.js" gapi_processed="true"></script> <script type="text/javascript" src="./IBanta.Blogspot.com Codility Demo Solutio n 100%_files/jsapi"></script> <script type="text/javascript" src="./IBanta.Blogspot.com Codility Demo Solutio n 100%_files/gfslideshow.js"></script> <script type="text/javascript"> if (typeof(BLOG_attachCsiOnload) != 'undefined' && BLOG_attachCsiOnload != null) { window['blogger_templates_experiment_id'] = "templatesV2";window['blogger_blo g_id'] = '1891650649212550830';BLOG_attachCsiOnload('item_'); }_WidgetManager._I nit('//www.blogger.com/rearrange?blogID\x3d1891650649212550830','//ibanta.blogsp ot.in/2012/02/codility-demo-solution-100.html','1891650649212550830'); _WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '18916506492 12550830', 'bloggerUrl': 'http://www.blogger.com', 'title': 'IBanta.Blogspot.com ', 'pageType': 'item', 'url': 'http://ibanta.blogspot.in/2012/02/codility-demo-s olution-100.html', 'canonicalUrl': 'http://ibanta.blogspot.com/2012/02/codilitydemo-solution-100.html', 'canonicalHomepageUrl': 'http://ibanta.blogspot.com/', 'homepageUrl': 'http://ibanta.blogspot.in/', 'blogspotFaviconUrl': 'http://ibant a.blogspot.in/favicon.ico', 'enabledCommentProfileImages': true, 'adultContent': false, 'disableAdSenseWidget': false, 'analyticsAccountNumber': '', 'searchLabe l': '', 'searchQuery': '', 'pageName': 'Codility Demo Solution 100%', 'pageTitle ': 'IBanta.Blogspot.com: Codility Demo Solution 100%', 'encoding': 'UTF-8', 'loc ale': 'en', 'localeUnderscoreDelimited': 'en', 'isPrivate': false, 'isMobile': f alse, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'lang uageDirection': 'ltr', 'feedLinks': '\74link rel\75\42alternate\42 type\75\42app

lication/atom+xml\42 title\75\42IBanta.Blogspot.com - Atom\42 href\75\42http://i banta.blogspot.com/feeds/posts/default\42 /\76\n\74link rel\75\42alternate\42 ty pe\75\42application/rss+xml\42 title\75\42IBanta.Blogspot.com - RSS\42 href\75\4 2http://ibanta.blogspot.com/feeds/posts/default?alt\75rss\42 /\76\n\74link rel\7 5\42service.post\42 type\75\42application/atom+xml\42 title\75\42IBanta.Blogspot .com - Atom\42 href\75\42http://www.blogger.com/feeds/1891650649212550830/posts/ default\42 /\76\n\n\74link rel\75\42alternate\42 type\75\42application/atom+xml\ 42 title\75\42IBanta.Blogspot.com - Atom\42 href\75\42http://ibanta.blogspot.com /feeds/377012569112191370/comments/default\42 /\76\n', 'meTag': '', 'openIdOpTag ': '', 'imageSrcTag': '', 'latencyHeadScript': '\74script type\75\42text/javascr ipt\42\76(function() { var b\75window,e\75\42jstiming\42,g\75\42tick\42;(functio n(){function d(a){this.t\75{};this.tick\75function(a,d,c){c\75void 0!\75c?c:(new Date).getTime();this.t[a]\75[c,d]};this[g](\42start\42,null,a)}var a\75new d;b. jstiming\75{Timer:d,load:a};if(b.performance\46\46b.performance.timing){var a\75 b.performance.timing,c\75b[e].load,f\75a.navigationStart,a\75a.responseStart;0\7 4f\46\46a\76\75f\46\46(c[g](\42_wtsrt\42,void 0,f),c[g](\42wtsrt_\42,\42_wtsrt\4 2,a),c[g](\42tbsd_\42,\42wtsrt_\42))}try{a\75null,b.chrome\46\46b.chrome.csi\46\ 46(a\75Math.floor(b.chrome.csi().pageT),c\46\0460\74f\46\46(c[g](\42_tbnd\42,voi d 0,b.chrome.csi().startE),\nc[g](\42tbnd_\42,\42_tbnd\42,f))),null\75\75a\46\46 b.gtbExternal\46\46(a\75b.gtbExternal.pageT()),null\75\75a\46\46b.external\46\46 (a\75b.external.pageT,c\46\0460\74f\46\46(c[g](\42_tbnd\42,void 0,b.external.sta rtE),c[g](\42tbnd_\42,\42_tbnd\42,f))),a\46\46(b[e].pt\75a)}catch(l){}})();b.tic kAboveFold\75function(d){var a\0750;if(d.offsetParent){do a+\75d.offsetTop;while (d\75d.offsetParent)}d\75a;750\76\75d\46\46b[e].load[g](\42aft\42)};var h\75!1;f unction k(){h||(h\75!0,b[e].load[g](\42firstScrollTime\42))}b.addEventListener?b .addEventListener(\42scroll\42,k,!1):b.attachEvent(\42onscroll\42,k);\n })();\74 /script\076', 'mobileHeadScript': '', 'adsenseClientId': 'pub-7069464999496285', 'ieCssRetrofitLinks': '\74!--[if IE]\76\74script type\75\42text/javascript\42 s rc\75\42//www.blogger.com/static/v1/jsbin/4041843765-ieretrofit.js\42\76\74/scri pt\76\n\74![endif]--\076', 'view': '', 'dynamicViewsCommentsSrc': '//www.blogblo g.com/dynamicviews/4224c15c4e7c9321/js/comments.js', 'dynamicViewsScriptSrc': '/ /www.blogblog.com/dynamicviews/eb3844d3f2fcefcb', 'plusOneApiSrc': 'https://apis .google.com/js/plusone.js', 'sf': 'n', 'tf': ''}}, {'name': 'skin', 'data': {'va rs': {'content_padding': '10px', 'paging_background': 'transparent none no-repea t scroll top center', 'image_border_small_size': '2px', 'body_background_gradien t_cap': 'url(//www.blogblog.com/1kt/simple/gradients_light.png)', 'tabs_selected _background_color': '#eeeeee', 'body_rule_color': '#eeeeee', 'header_shadow_spre ad': '1px', 'header_shadow_offset_left': '-1px', 'header_padding': '30px', 'link _visited_color': '#888888', 'mobile_background_size': 'auto', 'post_title_font': 'normal normal 22px Arial, Tahoma, Helvetica, FreeSans, sans-serif', 'tabs_text _color': '#999999', 'date_header_margin': 'inherit', 'header_background_gradient ': 'none', 'content_shadow_spread_webkit': '5px', 'header_bottom_border_size': ' 1px', 'header_shadow_offset_top': '-1px', 'mobile_button_color': '#ffffff', 'wid get_title_font': 'normal bold 11px Arial, Tahoma, Helvetica, FreeSans, sans-seri f', 'main_section_margin': '15px', 'keycolor': '#66bbdd', 'content_shadow_spread ': '40px', 'image_background_color': '#ffffff', 'header_font': 'normal normal 60 px Arial, Tahoma, Helvetica, FreeSans, sans-serif', 'header_background_color': ' transparent', 'main_border_width': '0', 'main_padding': '15px', 'tabs_border_col or': '#eeeeee', 'image_text_color': '#222222', 'description_text_size': '140%', 'post_footer_background_color': '#f9f9f9', 'body_background_gradient_tile': 'url (//www.blogblog.com/1kt/simple/body_gradient_tile_light.png)', 'page_width': 'au to', 'tabs_background_gradient': 'url(//www.blogblog.com/1kt/simple/gradients_li ght.png)', 'mobile_background_overlay': 'transparent none repeat scroll top left ', 'main_padding_bottom': '30px', 'tabs_background_color': '#f5f5f5', 'image_bor der_large_size': '5px', 'post_margin_bottom': '25px', 'body_background_override' : '', 'tabs_margin_side': '30px', 'link_hover_color': '#33aaff', 'description_te xt_color': '#777777', 'body_text_color': '#222222', 'content_padding_horizontal' : '10px', 'endSide': 'right', 'page_width_selector': '.region-inner', 'date_head er_padding': 'inherit', 'post_footer_text_color': '#666666', 'startSide': 'left' , 'date_header_color': '#222222', 'tabs_font': 'normal normal 14px Arial, Tahoma

, Helvetica, FreeSans, sans-serif', 'post_footer_border_color': '#eeeeee', 'body _font': 'normal normal 12px Arial, Tahoma, Helvetica, FreeSans, sans-serif', 'fo oter_bevel': '0', 'tabs_bevel_border_width': '1px', 'date_header_background_colo r': 'transparent', 'content_shadow_spread_ie': '10px', 'widget_title_text_color' : '#000000', 'header_border_horizontalsize': '0', 'image_border_color': '#eeeeee ', 'tabs_border_width': '1px', 'content_background_color': '#ffffff', 'link_colo r': '#2288bb', 'header_text_color': '#3399bb', 'date_header_letterspacing': 'inh erit', 'tabs_margin_top': '0', 'main_padding_top': '30px', 'header_border_size': '1px', 'tabs_selected_text_color': '#000000', 'content_background_color_selecto r': '.content-inner', 'body_background_color': '#66bbdd', 'widget_alternate_text _color': '#999999'}, 'override': ''}}, {'name': 'view', 'data': {'classic': {'na me': 'classic', 'url': '/?view\75classic'}, 'flipcard': {'name': 'flipcard', 'ur l': '/?view\75flipcard'}, 'magazine': {'name': 'magazine', 'url': '/?view\75maga zine'}, 'mosaic': {'name': 'mosaic', 'url': '/?view\75mosaic'}, 'sidebar': {'nam e': 'sidebar', 'url': '/?view\75sidebar'}, 'snapshot': {'name': 'snapshot', 'url ': '/?view\75snapshot'}, 'timeslide': {'name': 'timeslide', 'url': '/?view\75tim eslide'}}}]); _WidgetManager._RegisterWidget('_GadgetView', new _WidgetInfo('Gadget5', 'sideba r-right-3', null, document.getElementById('Gadget5'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HeaderView', new _WidgetInfo('Header2', 'header ', null, document.getElementById('Header2'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_AttributionView', new _WidgetInfo('Attribution1 ', 'footer-3', null, document.getElementById('Attribution1'), {'attribution': 'S imple template. Powered by \74a href\75\47http://www.blogger.com\47 target\75\47 _blank\47\76Blogger\74/a\76.'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog2', 'main', nul l, document.getElementById('Blog2'), {'cmtInteractionsEnabled': false, 'showBack links': true, 'postId': '377012569112191370', 'lightboxEnabled': true, 'lightbox ModuleUrl': '//www.blogger.com/static/v1/jsbin/1606174444-lbx.js', 'lightboxCssU rl': '//www.blogger.com/static/v1/v-css/228702327-lightbox_bundle.css'}, 'displa yModeFull')); _WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog1', 'main', nul l, document.getElementById('Blog1'), {'cmtInteractionsEnabled': false, 'showBack links': true, 'postId': '377012569112191370', 'lightboxEnabled': true, 'lightbox ModuleUrl': '//www.blogger.com/static/v1/jsbin/1606174444-lbx.js', 'lightboxCssU rl': '//www.blogger.com/static/v1/v-css/228702327-lightbox_bundle.css'}, 'displa yModeFull')); _WidgetManager._RegisterWidget('_AdSenseView', new _WidgetInfo('AdSense2', 'side bar-right-1', null, document.getElementById('AdSense2'), {}, 'displayModeFull')) ; _WidgetManager._RegisterWidget('_TextView', new _WidgetInfo('Text2', 'sidebar-ri ght-1', null, document.getElementById('Text2'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LabelView', new _WidgetInfo('Label2', 'sidebarright-1', null, document.getElementById('Label2'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_FollowersView', new _WidgetInfo('Followers2', ' sidebar-right-1', null, document.getElementById('Followers2'), {}, 'displayModeF ull')); _WidgetManager._RegisterWidget('_TextView', new _WidgetInfo('Text1', 'sidebar-ri ght-1', null, document.getElementById('Text1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_SlideshowView', new _WidgetInfo('Slideshow1', ' sidebar-right-1', null, document.getElementById('Slideshow1'), {'title': 'Banta\ 47s Slideshow', 'computedFeed': 'http://picasaweb.google.com/data/feed/api/searc h?kind\75photo\46max-results\07520\46q\75Sports%20cars\46alt\75rss', 'linkNewWin dow': false, 'randomizeFeed': true, 'speed': 3000}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LabelView', new _WidgetInfo('Label1', 'sidebarright-1', null, document.getElementById('Label1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML2', 'sidebar-ri ght-1', null, document.getElementById('HTML2'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML1', 'sidebar-ri ght-1', null, document.getElementById('HTML1'), {}, 'displayModeFull'));

_WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML3', 'sidebar-ri ght-1', null, document.getElementById('HTML3'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_AdSenseView', new _WidgetInfo('AdSense1', 'side bar-right-1', null, document.getElementById('AdSense1'), {}, 'displayModeFull')) ; _WidgetManager._RegisterWidget('_SubscribeView', new _WidgetInfo('Subscribe1', ' sidebar-right-1', null, document.getElementById('Subscribe1'), {}, 'displayModeF ull')); _WidgetManager._RegisterWidget('_PageListView', new _WidgetInfo('PageList1', 'si debar-right-1', null, document.getElementById('PageList1'), {'title': 'Pages', ' links': [{'href': 'http://ibanta.blogspot.in/', 'title': 'Home', 'isCurrentPage' : false}, {'href': 'http://ibanta.blogspot.in/p/entertainment.html', 'title': 'E ntertainment', 'isCurrentPage': false}], 'mobile': false}, 'displayModeFull')); _WidgetManager._RegisterWidget('_ProfileView', new _WidgetInfo('Profile1', 'side bar-right-1', null, document.getElementById('Profile1'), {}, 'displayModeFull')) ; _WidgetManager._RegisterWidget('_FollowersView', new _WidgetInfo('Followers1', ' sidebar-right-1', null, document.getElementById('Followers1'), {}, 'displayModeF ull')); _WidgetManager._RegisterWidget('_BlogArchiveView', new _WidgetInfo('BlogArchive1 ', 'sidebar-right-1', null, document.getElementById('BlogArchive1'), {'languageD irection': 'ltr'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_GadgetView', new _WidgetInfo('Gadget1', 'sideba r-right-1', null, document.getElementById('Gadget1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_CustomSearchView', new _WidgetInfo('CustomSearc h1', 'sidebar-right-1', null, document.getElementById('CustomSearch1'), {'title' : 'Search', 'includeBlog': true, 'includePostLinks': true, 'includeWeb': true, ' linkLists': [{'id': 'LinkList1', 'title': 'Linkbar'}], 'blogUrl': 'http://ibanta .blogspot.com/', 'loadingMsg': 'Loading...', 'thisBlogMsg': 'This Blog', 'linked FromHereMsg': 'Linked From Here', 'theWebMsg': 'The Web', 'backgroundColor': '#f fffff', 'textColor': '#222222', 'dateColor': '#777777', 'linkColor': '#2288bb', 'urlColor': '#2288bb', 'visitedLinkColor': '#888888', 'borderColor': '#eeeeee', 'activeBorderColor': '#eeeeee'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_TextView', new _WidgetInfo('Text99', 'sidebar-r ight-2-2', null, document.getElementById('Text99'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_NavbarView', new _WidgetInfo('Navbar1', 'navbar ', null, document.getElementById('Navbar1'), {}, 'displayModeFull')); </script> </body></html>

You might also like