Overview

An Operating system is a program that acts as an intermediary between the user of a computer and the computer hardware. The purpose of an operating system is to provide and environment in which a user  can execute programs in a convenient and efficient manner.

The operating systems provide certain services to programs and to the users of those programs in order to make their tasks easier. The services differ from one operating system to another, but we identify and explore some common classes of these services.

Find The Longest Palindrome In A String

Originally posted on Programming Praxis:

Greplin issued a programming challenge recently that required programmers to solve three problems; when completed, Greplin issued an invitation to send them a resume. The first problem required the programmer to find the longest palindrome in the following 1169-character string:


Fourscoreandsevenyearsagoourfaathersbroughtforthonthisconta
inentanewnationconceivedinzLibertyanddedicatedtotheproposit
ionthatallmenarecreatedequalNowweareengagedinagreahtcivilwa
rtestingwhetherthatnaptionoranynartionsoconceivedandsodedic
atedcanlongendureWeareqmetonagreatbattlefiemldoftzhatwarWeh
avecometodedicpateaportionofthatfieldasafinalrestingplacefo
rthosewhoheregavetheirlivesthatthatnationmightliveItisaltog
etherfangandproperthatweshoulddothisButinalargersensewecann
otdedicatewecannotconsecratewecannothallowthisgroundThebrav
elmenlivinganddeadwhostruggledherehaveconsecrateditfarabove
ourpoorponwertoaddordetractTgheworldadswfilllittlenotlenorl
ongrememberwhatwesayherebutitcanneverforgetwhattheydidhereI
tisforusthelivingrathertobededicatedheretotheulnfinishedwor
kwhichtheywhofoughtherehavethusfarsonoblyadvancedItisrather
forustobeherededicatedtothegreattdafskremainingbeforeusthat
fromthesehonoreddeadwetakeincreaseddevotiontothatcauseforwh
ichtheygavethelastpfullmeasureofdevotionthatweherehighlyres
olvethatthesedeadshallnothavediedinvainthatthisnationunsder
Godshallhaveanewbirthoffreedomandthatgovernmentofthepeopleb
ythepeopleforthepeopleshallnotperishfromtheearth

Your task is to write a function that finds the longest palindrome in a string and apply it to the string given above. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.

There are several ways to attack this problem. The easiest is to form all possible substrings of the original, test each substring to see if it is a palindrome, and keep the longest. That’s an O(n3

View original 500 more words

An Year closer to Final Year.

Today I have started my third year of cse in NIT Warangal. Feeling relieved after taking the room in 1k which is one of the desired blocks of NIT Warangal. My room no. is 1228 in 1k. While I was I travelling in train from secunderabad to kazipet There were many thoughts flashing in my mind. Obviously I couldn’t remember all of those, But few of them are here:

1)Actually today while I was I going to station from home It rained heavily that It made me miss the train at 7:40 in the morning although I managed to reach the station to catch hold of Telangana Exp at 8:20.So here is my thought  “I am in rain, My work in vain, These are the thoughts in my brain”.Although it is short It expresses my true feeling. Thanks to rain,vain and brain.

2)I aspired for the change of the Nation. I always get this feeling when I travel through the roads or trains “Why India is still the same? Where is the development. I could see” .I think the day comes when everyone strives hard to make our country the number in the world. Today USA is ruling the world but there comes a day where India will be the number in all. This might be little bit of fantasy . But this is one of my dreams and there is no point of being negative. I love my nation till the last breathe of my life.