Monday, March 31, 2014

Compress the Number Range




Program:   Compress the Number Range.

Input will be given as sequence of number , we need to compress the number if the numbers are continues.
Ex:  1,2,3,8,9,52,30,31,32.
Output : 1-3,8-9,30-32,52

Coding

class Program
    {
        static void Main(string[] args)
        {
            string numrange = "52,23,13,14,89,11,90,12,36,86,87,88,4,6,8,9,1,2,3";
            string asscendingorder = ordernumber(numrange);
            string finaloutput = compressnumber(asscendingorder);
            Console.ReadKey();
        }

        private static string ordernumber(string num)
        {
            // Bubble sorting Technique
            string[] range = num.Split(',');
            int i = 0;
            while (i < range.Length)
            {
                for (int j = 0; j < range.Length - 1; j++)
                {
                    if (int.Parse(range[j]) > int.Parse(range[j + 1]))
                    {
                        var x = range[j];
                        var y = range[j + 1];
                        range[j] = y;
                        range[j + 1] = x;
                    }
                }
                i++;
            }
            string orderedlist = string.Join(",", range);        
            return orderedlist;
        }

        private static string compressnumber(string num)
        {        
            int count = 0;
            String final =null;
            string[] range = num.Split(',');
            for (int i = 0; i < range.Length-1; i++)
            {              
                int first = int.Parse(range[i]);
                int second = int.Parse(range[i + 1]);
                if (!((first + 1).Equals(second)))
                {
                    count = 0;
                    final = final + range[i] + ",";                
                }
                else if (count == 0)
                {
                    count++;
                    final = final+ range[i] + "-";                    
                }
                if (i.Equals(range.Length - 2))
                {
                    final = final + range[i+1];
                }
            }  

            return final.ToString();
        }
    }

Friday, March 28, 2014

Vannathil irrukkum Nilavvu

Nee irunkinjai nilavil athai nan parkenjan enn veedu mottai maddiel.. Irravellay nee irrunkijal enn mana kudarathil migha allaghai , enn kaighalukkul puttha thamaraiyai irrukkirai, kadaisiel than therinthathu athu oru azhakiya pagal nilavvu , thamaraiyo thanniril ottathu endru..annalum enna manthu sollukirathu antha nilavai enn kudarathirrukkul adaithu Vida mudium endru, thamaraiyo athan valnallai athey thannirrill than kallighinjathu.

Friday, March 21, 2014

Manathil Oru Aassai

Nee engay irrukai endru ennakku theriavilli En manathoy dhinamum nee sikkiram varuvai endru oru anandhathil kalipadaikirrathu.
Dhinam nan parpathoy kalai kathiravan anal en manam nenaipathoy un allakiya mugham.
Kallai pholuthin antha innimaiyana oosai un meillia pacchu.
Nan irrullil errukkum pothu kuda nee en manthil oru nilvagha pirakhachikkirai.
Dhinam nee varruvai endru!!!
Dell

Sunday, March 16, 2014

Kajol ki Fanaa ne Crazy kia

. During my college final year, most of the time ll do something other than academics. Those time no computer no smart phones no movies. We used to go theatre not frequently monthly once , the local Ganesh theatre we watched most of the mid range Tamil and english movies( Puthupettai, James Bond movies etc..) Those times I heared one song which is something new and roaming in my memory that only the lyrics word "Subhanalla Subhanalla", that time there was no opportunity to watch Hindi movie even I wasn't interested in other language movie's. My friend Palani once told me that the song is from faana movie and he given hint about movie something related to terrorist movie that kajol played a blind girl , thought that Kajol played a anti role( terrorist) .



Days gone after long six year had chance to watch Faana movie. You could have ask me wht could have changed you to watch Hindi movies? After my college days moved to Chennai here working in one IT company.this is my successful fourth year and I felt that didn't do something new in ma life. Suddenly started running and did few half marathon in short four months of duration, good thing is to know good friends in ma runny group( KK Nager Pillar Pacers). We were planned to watch other language movies( Telugu & Hindi). here Chennai most of the people knows multi lingual .one day we went for new release salmon movie "Jai Ho" first time in abirami theater in purasaiwalkkam. Tried to understand dialogue but luckily its action movie. This was motivated me to learn at least basic Hindi and got interested in Hindi movies. Suddenly the "Subhanalla" song came into my mind and eagerly put download faana movie in my laptop. After download completed immediately start watching movie @11pm on that night. Initially thought I would go sleep if it bored , Movie stared kajol is on the screen , she was absolutely awesome in blind girl something she has some magnetic power in her eyes! Amir Khan also equally charm! First half completed now realized that Amirkhan played a militant. In the second half the kajol expressions are really powerful so natural whenever she remembering her love with amirkhan. No words to explain her facial expression!! That moment it made me big fan of Kajol. Watched movie more than ten times and watched and listened more than thirty times of the song "Mere haat main taree haat ho". In the next one week watched few other kajol movie 'Ishq' , 'Diwalle dulhaniya Lee jayanghe'.. I know kajol from Minsara kannavu movie but in that didn't felt her magnetic power!

Words,
Dell