Thursday, May 23, 2019
Should Animals Be Used in Medical Research?
Should animals be used in medical research? The use of animals in laboratory research is a very well cognize debate. Many people wonder if the animals are treated well and if they are taken care of properly however, if medical and scientifical experimentation were done in completely human trials the knowledge and understanding of how drugs and procedures can affect human would be decades behind. That is why the use of animals in experimentation is a necessity in set out to continue advancing medicine and science.Animals have a high reproductive rate and are easy to breed. Animals have the same organs and tissues as humankind do making them a good match. Animals that are used in experimentation are generally small and are easy to keep and feed. It is the take up way to learn the effectuate of substances in a living body because animals are very easy to breed and yield a high measure of offspring. A higher number of offspring allows for a greater number of experiments or trials to be performed at a time.The greater the number of trials that can be performed will increase the data that can be collected to increase the accuracy of the trial. If a drug was tested on humans and the first deuce people to take the drug died, chances are the drug would be discontinued and research shut down, even if the deaths were only coincidence. By having a big sample size of animals that can test the effects to see how fatal the drug is and determine how it can be improved. Even if many experiments have expected results the effects of a drug could be wide spread.This is why employ animals as a match for humans is advantageous because it allow scientists to observe the effects on living tissue under controlled circumstances in many subjects, and collect appropriate data so the margin of error can be reserve as small as possible. The ability to see the consequences of drugs on animals its success rate because it avoids death of many people who could be used as subject. With out using animals in research labs, our progression with medicine and medical sciences would slow down dramatically.Every day new medicines and practices are coming out that, without the help of animals, would never make it to us. They might make it to us, but only after blindly testing on random human volunteers that could possibly die just as easy from the testing as a rat would if used in the humans place To sump, I would say that many of the medications and procedures that we currently use today wouldnt exist and the development of future treatments would be extremely limited. Animal testing is the right way to test products. Animals have the right to live their own carriage and we are not allowed to mess around with them just because we can.
Wednesday, May 22, 2019
Pipeline Systems Essay
Drawbacks of the Pipeline for Alberta Oil mining is the pillar industry in Alberta and building grapevine system is the close efficient way to transport oil into some other areas. However, whether note systems are appropriate technology has been debated for many years. Appropriate technology means the technology that is knowing with consideration to the environmental, ethical, cultural, social,political, and economical aspects of the community it is intended for. 1 Many people believe that the Conduit System pipeline is non appropriate technology.The reason is that though it is profitable , it decreases the demand of developing new environmental-friendly power systems. Also some of the First Nations think it is so ridiculous to sell the precious resources which is given by our ancestors and nature. Moreover it is not a environmentally beneficial system. This paper will support the point of view that the conduit system is actually an inappropriate technology by illustrating ex amples in such three perspectives.In the first place,the project is certainly a tremendous display of the short sighted thinking2 because it only thinks about the short-time economic sack without considering the environmental problems. Also the construction of Pipeline system decreases the motivation of developing new environmental-friendly power systems. Once the conduit system pipeline is built up,more and more companies would make up and build more of the pipelines, since it is a profitable and a some easy way to transporting oil.However, once the pipelines are set up, the companies has to run it rapidly, otherwise the construction follow would never be recovered. Under this situation, it limits the sustainable economy development . Thus the construction of pipeline system are strongly discommended. Furthermore, the conduit system pipeline leads to disagreements and conflicts with the Canadian society, especially between the First Nation and the government. Every individual and social group has their own belief and way of life. We do not support this pipeline project. We believed that the project has the potential to harm our environment ,as well as our way of life. We hope that our voice is heard and taken into consideration. 3 said by the First Nations leaders. It contradicts the economy growth valued by the Conduit company, as well as the government, therefore confits appears. Therefore, it is obvious that the Conduit company pipeline would trigger dispute between First Nations and other social groups.Lastly, it is not environmentally beneficial for the human race to build the pipeline system in the long term. Oil spilling is a serious take exception for oil transporting industry, especially for long distance pipeline system. The Enbridge oil spill 4 is a strong example, over 190000 liters oil seeped out. The impact of oil spill is catastrophic. snow dioxide will be released to atmosphere increasingly, the green-house-effect will be more serious. At the same time the eco-system will be ruined, the fields can not be grown in 10 years or more.It is a disaster for both human and nature. An oil spill from this pipeline will have study media coverage, which would effectively destroy Canadas reputation. 5 said the politician. Furthermore the oil of Alberta is non-renewable energy resource, it can not be produced in thousands years. Though the pipeline system is the most efficient way to transport the resources, what we can leave to our next generations if the oil is exhausted. Overall, it is obvious that the conduit system is actually not an appropriate technology for Alberta.According to the examples and analyses above, the pipeline system is a immature technology which creates social conflict,damages the planet and leaves even more environmental issues to the younger generations. 6 Consequently, the applying of the conduit system still needs more consideration. (1)Engineers Without Borders -Case workplace Conduit Systems http s//eclass. srv. ualberta. ca/mod/resource/view. php? id=551299 (2)http//www. cbc. ca/news/canada/story/2012/07/28/enbridge-wisconsin-spill-pipeline-closed. html (3)Engineers Without Borders -Case Study Conduit Systems https//eclass. srv. ualberta. ca/mod/resource/view. php? id=551299
Tuesday, May 21, 2019
Imperialism and Capitalism
Imperialism which is often considered to be a final stage of capitalism was a reasonable continuation of industrialization, tuition of trade and colonization. Global trade and goods exchange charter united Europe, Africa, America and Asia into an integral organism. Imperial system as closely as interaction between the major compound super-powers guaranteed economical stability and peace. Colonies were perfect markets for the goods produced in metropolises and were used as emergency zones in cases of oerproduction in rear to prevent global or local economical crisis.Colonies were used as raw material donors of metropolitan intentness. In decree to prevent movement for policy-making and economical independence, colonies were non allowed to have industrial objects as their economical activity was limited to farming and mining. On the hand with traditional colonial system which took stake in France, Great Britain, Belgium which had huge possessions mankindwide, American impe rialism had introduced a new one without any formal colonial possessions.American imperialism was different from British and French as it penetrated into independent countries, making their single-sector economies be dependent upon the impairment policies tag by American corporations. American imperialists used different methods in dedicate to widen their spheres of allure in western hemisphere bribery of corrupted officials, aiding political ohmic resistance of unprecious regimes and even indeterminate intervention by American troops which always ended with establishing of puppet politicss. These methods were used on Philippines, Cuba, and Puerto-Rico.The effectuate of imperialism are quite different both for colonies and imperial metropolises from one side goods exchange ensured economical stability, from the other side imperial ambitions of superpowers resulted WW1. Colonies experienced mostly negative impacts industrial backwardness, dependence upon metropolises, povert y, well-disposed injustice and discrimination. Of ancestry the appearance of imperialism as a new world order at the beginning of the twentieth cytosine had provoked continuing discussions about its real impacts on elaboration.Contemporaries either supported imperialism or sharp criticized it. Kipling, for example, insisted that imperialism was a logical continuation of civilization progress and it was vital in order western civilization to survive, as it prevented it from economical and sociable crisis, guaranteed goods exchange, development of trade and stability in western world. This concept is kind of conservative as Kipling withal supports the idea of racial and cultural superiority of western civilization and this divisor is considered to be justification of colonial expautonomic nervous systemion in his theory.On the other hand such authors as Hobson consider imperialism to be one of the alternatives to economical development which has a global character and is result ed by tautness of wealth within one country. Hobson argues that in order world economy to develop, this wealth has to be distributed abroad as it will promote development of both economies metropolitan and colonial. The growth of anti-imperialist movement was resulted by its devastating influence on colonial countries which appeared to be in total dependence from imperialist asseverates.Anti-imperialist movement took array in India, China, and Latin America. In fact the accident which take to WW1 had also anti-imperialist background, as Serbian revolutionaries were panicked that Serbia will become a dependent territory of Austria-Hungary. The results of WW1 were contradictory for different countries. Four European empires Germany, Austria Hungary, Russian and Ottoman Empire collapsed in 1918 when the war was over.Moreover, prolonged economical and social crisis caused by the 4 geezerhood of bloody war had resulted a series of revolutions and public unrest world wide, changin g political penchant of many countries. Bolshevik revolution in Russia brought to power a small group of political mathematical groups led by Vladimir Lenin, who started to build a new order in semi-feudal country according to Marxist ideas of capableity, abolishment of private property and establishment of proletariat dictatorship. Tsarist regime was substituted by a new radical ideology of communism which was alien to Russian peasants and middle class.The years of prolonged terror, artificial hunger, repressions had changed the country and had changed multitudes mentality to the mentality of oppressed people who was living under dictators rule. A new Soviet nation was raised in the panic of capitalist world, in the fear of the executable threat from the side of international capitalism and in constant preparation for war. Actually the premises for incoming cold war originated in interwar period and foreign intervention against Soviet Russia in 1919-1921 had only deepened fear of Soviet people.Stalin, a new leader of Communist party had created his own doctrine of socialist state. rapid industrialization and collectivization in agricultural sector had changed countrys economy, making it stable and more than advanced. In fact, Communist Russia was the only country which experienced economical growth starting from middle 1920s and going all the way to 1941, whiles the world of capitalism was suffering from global economical crisis. Communism became a potential threat for capitalist world and the USSR had become an ideological enemy of the West.Stalin understood it quite well and was getting ready for a possible war. Industrialization and militarization of economy were essential in order to survive and provide security to the country. As the power of the Soviet Union grew, it became pellucid that it would have territorial ambitions for the spread of communist ideology worldwide. Prosperity in major European countries and in the USA in early 1920s was contrasted by deep economical and social crisis in Germany and Italy.The conditions of Versailles treaty had imposed unsufferable obligations on Germany as the government of Weimar republic had to pay huge reparations to victors of WW1. Besides, destroyed infrastructure of Germany lacked mineral resources and industriousness as Germany lost the region of Saar, Alsace-Lorraine and several major seaports on the coast of the Baltic Sea unneurotic with several colonies in Africa and Asia. The country had no opportunity for development new elective government failed to rebuild countrys infrastructure, only irritating people and provoking social unrest. gloomy nation wanted revenge and retreat. Liberties and democratic freedoms of Weimar constitution were not popular as the nation felt nostalgia about the age of iron order and international respect. Crisis of Weimar republic turned into growth of nationalism and chauvinistic ideas, supported by common people and former WW1 sold iers and officers who were left forgotten by government. This is the main explanation of fascism success in Germany. Crisis in Italy had many similar features to German one.Unemployment, poverty and social unrest in early 1920s had created a favorable climate for the rise of Benito Mussolini, the leader of a new party formed by WW1 soldiers and officers who were irritated by economical crisis. Mussolinis populist ideas were close both to common people ans to upper classes as he promised social stability and order. Mussolinis political program was successful in 1920s and in early 1930s as he stabilized economy, solved major social problems of poverty, unemployment and other social vices and returned self respect and pride to Italian nation.His government controlled media, regulated economy and social life of the country. plainly at the same time Mussolini revealed militaristic ambitions of fascist Italia- intervention and capture of Abyssinia is the trump out proof of it. War in Ab yssinia was not the only conflict fought after the WW1. On the Far East, militarist Japan started intervention against Manchuria in 1938. These conflicts have shown the decrepitness of League of Nation, organization which was created in order to keep open peace and prevent wars and local conflicts.Economical crisis on the hand with disintegration of the capitalist world and exploitation threat from ideological enemy of capitalism-the USSR demonstrate the complicated system international relations in inter-war period. The results of WW1 became obvious after the 20 year period 2 totalitarian states (the USSR and Nazi Germany) which had colonial ambitions stood against disintegrated democratic world, which was to weak to resist aggression of these two superpowers. The inter war period in the world history is characterized by three different concepts of state development communist, fascist and traditional democratic.Even though they are hostile, individually was successful on a tr usted stage of development as it had taken ruined Russian empire, Germany and the USA out of economical crisis and had returned confidence and stability to their peoples. After Bolsheviks revolution in Russia, former empire was turned into a new state ruled by the Communist Party. Communist party of the USSR had make radical changes realizing Marxist ideas about revolution and dictatorship of proletariat abolition of private property, nationalization and equality of all citizens.Understandably in a patriarchal agricultural country with underdeveloped industry and ruined economy any idea about a robust state of proletariat (working class) would fail, but not in Russia. Stalin, who became the head of the communist party in 1928, had his own plan how to reform economy he proclaimed a course on rapid industrialization and collectivization of farming enterprises. In order to achieve development of industry he performed redistribution of property, expropriating agricultural products from peasants and making them work in kolkhozes (collective state own farms).In fact he turned free farmers into state slaves who had no property and had to work on state farms in order to survive. This cruel and inhuman practice gave the opportunity to develop heavy industry mining and it gave the opportunity to start militarization. These results were achieved by numerous victims of innocent people who suffered from repressions and great purges as Stalins regime eliminated anyone who had another opinion on the destiny of the country. The total number of Stalins victims exceeds 20 one thousand thousand people. So what were his achievements?In quite a short period (20 years) Russia was turned into an industrial state with ontogeny industry and one of the strongest armies in Europe. Society had changed as it was developing according to a socialist model. put forward was the only power in the country, state was the only property owner. Citizens in majority were or so equal the differen ce between those who had the highest and the lowest income was not really distinct as in capitalist world. In fact, state provided a working citizen with essential facilities for living and guaranteed basic social and medial care.People got the facilities in order to work good enough but nothing else. The order in the country was cognise by a total control of media, press and oppression of any potential opposition. Communism substituted godliness as the official religion of communist state was atheism, communist party controlled all spheres of life, which led to the isolation of the country. Free market was substituted by barter within the country and market relations were substituted by be after economy..From historical point of view, the politics of Stalin, even being brutal and inhuman, was justified by historical need, as in order to survive and not collapse, Soviet Russia had to become a super power with a strong army and developed industry from an out-dated, semi-feudal em pire with ineffective state management and corrupted disconsolate government. The main weakness of Stalins Russia was that the only condition under which the country could stand and continue its development was the policy of terror and oppression of any potential threat in the face of political opposition.such(prenominal) kind of regime, based only on suppression of human individualism, collectivism and isolation from the rest of the world would definitely fail if some liberties were allowed. So if to look on the history of the Soviet Union starting from Nikita Khrushchev we will see the gradual decline of totalitarian empire, which collapsed in 1991. Another example of totalitarian state of inter-war period is Nazi Germany. Nazi Germany led by Adolph Hitler embodied fascist ideas about a strong state with iron order. Hitlers phenomenon was a direct result of Versailles Treaty consequences for after war Germany.Humiliated nation, which suffered the burden of huge reparations, deep economical economic crisis and social crisis caused by ineffective politics of democratic government of Weimar republic wanted the only thing retreat and revenge. So chauvinist and radical ideas of Nazis have succeeded. Germans saw a leader in Hitler, who promised return international respect and prosperity to the nation. Hitlers political program was very simple and it satisfied Germans fully. Hitler promised descent work to workers and guaranteed protection of private property to businessmen.But his political program was also based on racial hatred, anti-Semitism, blind chauvinism and aggression. Nazis used nearly the same methods of oppression Stalin practiced during great purges, but they focused on ethnic non-German minorities, Communists and political opposition to Hitlers national-Socialist Party. German economy during Hitlers regime was also state regulated, as the owners of industrial objects had certain obligations they had to provide decent wages to workers and had to fu lfill industrial state orders.Hitler had changed economy, he made it military oriented preparing the nation for a war. Social life during Nazi regime was also subjected to total control, fascist government controlled media, eliminated political opposition, persecuted ethnic minorities, which turned into Holocaust and genocide during WW2. Hitlers regime which had to solve racial and territorial question was inhuman and contradicted modern human consciousness. It had to be stop anyway by international coalition, differently the absurd and paranoia of one man would cause a world human tragedy.The methods of state regulation were also present during Roosevelts office even though he represented a free democratic country living under the laws of capitalism. Roosevelts New deal was a set of reforms and a set of measures taken in order to relief the affects of the Great depression. State regulation over prices, control over banks activity and other measures had strengthened economy, gettin g the country of crisis. Nevertheless, despite the terrible affects of economical crisis and Great depression the USA stood and recovered.Comparing social and economical situation in the USSR, the USA and Germany in inter-war period we may find several similar features in activities of their governments. all told of them provided social programs for citizens in order to guarantee credit of basic human living needs health care, education, social protection and basic welfare programs. All three political regimes used state control over economy, which never used before. But in comparison to the USA where it had a temporary character, Germany and the USSR used it as an integral method of state establishment which guaranteed stability and security.
Monday, May 20, 2019
Research Paper “Eragon”
A CHARACTER SKETCH OF THE PROTAGONIST IN CHRISTOPHER PAOLINIS ERAGON A Research study Presented to the High School Depart handst Holy Angel University by Zwitsel P. SuarezCristle Yumul Alyssa enjoyment S. SomeraLorenz A. Zamora Pamela Joy P. Sotto Mark Louie S. Venzon Aira Joy Teopaco Ian Jasper Villena to Mrs, Anna Ruby S. Perez 1 March 2011 Eragon Controlling Purpose To show the traits of the help in Christopher Paolinis Eragon finished char make outer analysis. 1. Introduction 1. 1. Background of the author 1. 2. Summary of the novel 1. 3. Definition of terms 1. 3. 1. agonist 1. 3. 2 Character analysis . 3. 3. Trait 1. 3. 4. genus Draco Rider 1. 3. 5. Urgal 1. 3. 6. Varden 1. 3. 7. Razac 1. 3. 8. Alagaesia 1. 3. 9. The Spine 2. Body 2. 1. Background of Eragon 2. 2. Traits of Eragon 2. 2. 1. hold 2. 2. 2. Vigilant 2. 2. 3. Kind 2. 2. 4. Responsible 2. 2. 5. Determined 2. 2. 6. Persevere 3. Conclusion References Chapter 1 Introduction Eragon is chosen to be the focus of the s tudy beca part he is the main character of the story. And the researchers get out brainstorm and share some ideas how to usher the character of Eragon creatively. The story talks about potassium hydrogen tartrates and dragon riders who live in a magical kingdom. battalion live peacefully there until ane day, a young dragon rider betrays his race. His name is Galbatorix. He kills every(prenominal) dragons and riders because he wants to be the nigh powerful in the kingdom. Becoming successful, he rules the kingdom of Alagaesia. tho there is this Elven lady, who is a princess, taking care of the last dragon egg, which is their last and only hope. She sends it to the Spine and there, a young farm boy sees it in the middle of the forest. This young poor boy named Eragon thinks it was a scarce stern stone. He tries to sell it but no one gets it. Until one ay, he sees the egg cracking. He is amazed because he sees a cute little dragon coming after him. Without knowing, Eragons de al with the dragon is now starting. They are destined to beat Galbatorixs reign and be the last dragon and rider. The ad perils of Eragon exit show his different traits, which are universe highlighted in this study. Background of the author Christopher Paolini (born November 17, 1983 in gray California) is an American novelist. He is best known as the author of the hereditary pattern Cycle, which consists of the discussions Eragon, Eldest, Brisingr, and a currently ignoble quartern book.He lives in Paradise Valley, meitnerium, where he wrote his first book. Christopher Paolini was raised in the Paradise Valley, Montana domain of a function. His family members include his parents, Kenneth Paolini and Talita Hodgkinson, and his sister, Angela Paolini. Home schooled for the duration of his education, Paolini graduated from high school at the age of 15 by means of a set of accredited correspondence courses from American School of Correspondence in Lansing, Illinois. Following gr aduation, he started his work on what would become the novel Eragon, the first of a series set in the mythologic land of Alagaesia.In 2002, Eragon was publish by Paolini International LLC, Paolinis parents company. To promote the book, Paolini toured over 135 schools and libraries, discussing reading and writing, all the while dressed in a medieval costume of red shirt, billowy black pants, lace-up boots, and a jaunty black cap. Paolini created the cover art for the first edition of Eragon, which featured Saphiras eye. He also draw the maps on the inside covers of his books. In summer 2002, the stepson of author Carl Hiaasen found Eragon in a bookstore and love it, and Hiaasen brought it to the precaution of his publisher, Alfred A.Knopf. Knopf subsequently ghastlye an offer to publish Eragon and the rest of the Inheritance cycle. The second edition of Eragon was published by Knopf in August 2003. At the age of nineteen, Paolini became a New York Times bestselling author. Erago n has since been adapted into a film of the same name. Eldest, the sequel to Eragon, was released August 23, 2005. The third book in the cycle, Brisingr, was released on September 20, 2008. Although the Inheritance Cycle was planned as a trilogy, the details for Brisingr had to be expanded to include a fourth book, that has yet to be titled(http//en. ikipedia. org/wiki/Christopher_Paolini). Christopher Paoliniss abiding love of fantasy and science fiction inspired him to light writing his debut novel, Eragon when he graduated from high school at fifteen after being home schooled all his life. He became a New York Times best selling author at nineteen. Christopher Paolini lives in Montana, where the dramatic landscape feeds his visions of Alagaesia(www. Alagaesia. com). Summary of the novel The 15 year old resident of Carvahall, Eragon, starts the book by finding a strange aristocratical stone while traversing The Spine, a mountainous area outside his home.The world in which this n ovel takes place is known as Alagaesia, under the control of Galbatorix, a fallen Dragon Rider, now evil. These dragon riders used to be the peace keepers of the world, but when his dragon died, Galbatorix went mad and killed his fellow riders. Eragons blue stone hatches pointtually and from it emerges a dragon. Because of the rarity of the birth (dragons are sibyllic to be extinct), Eragon keeps his find secret and raises his dragon away from prying eyes, until two dark Razac commemorate the town looking for the stone.The dragon, named Saphira, leaves the town with Eragon to hide in the forest. While Eragon is away, the Razac kill Eragons Uncle Garrow and burn up his house down. In response, Eragon declares himself a new Dragon Rider in the vain of those past, the peace keepers, out front Galbatorix betrayed them. Eragon takes with him on his journeys Brom, a weaver of stories from his town with knowledge on everything Eragon needs to protect himself and defeat the Razac. The three finally reach the town of Teirm where Brom tick offs that the Razac are in Helgrind, the four-peaked mountain near the city of Dras-Leona.The three travel there and are lured into a trap set by the Razac, flunk to find the revenge that Eragon so desparately seeks. Rescued by Murtagh, an unknown stranger, Eragon and Saphira survive, but his mentor Bram is hurt and presently dies. He reveals before his death though that he was once a Dragon Rider, betrayed by Gaslbatorix worry the others, his dragon murdered. After Galbatorixs coup, Brom became a member of Varden, and sniped the unhatched egg that Eragon eventually found, Saphiras blue stone. A recollective with Murtagh, Eragon and Saphira set out to find Varden to help them.A desire their journey, Eragon begins to have odd dreams of a mystic female elf in trouble. When Eragon is captured, he finally meets her, both of them absorbed together. Murtagh and Saphira strike the prison though and manage to resuce both Eragon an d the elf. During the rescue, the three encounter Shade, a horrible creature that should not be awake. The revalation of such(prenominal) a horrible creature loose upon the world causes the three to assume that Galbatorix is in league with darker forces yet. On the way to the Varden, Eragon must deal with an immense influx of foes and dangers, including an army of Urgals chasing them all the way there.The Vardens fortress, located in the depths of the Beor Mountains, is host to crowds of dwarves, elves, and Varden, who are in league, having sent Saphiras egg to The Spine where Eragon found it. Given a short rest, the three along with the Varden and their allies must prepare for the arrival of the Urgal as the approach the mountain. They learn for sure that Galbatorix is in league with the dark forces from a stolen messenge and soon they are in a contest with the Urgal. During the battle, the Urgals are close to defeating the Varden until Eragon defeats the Shade they encountered e arlier.However, the battle with the Shade leaves him horribly disfigured and in pain. When the battle ends, termination the first chapter in the Inheritance trilogy, Eragon is preparing to go study with the elves(http//www. wikisummaries. org/Eragon). Definition of terms Protagonist- A protagonist (from the classical protagonistes, one who plays the first part, chief actor) is the main character (the central or primary personal figure) of a literary, theatrical, cinematic, or musical narrative, around whom the events of the narratives plot revolve and with whom the audience is intended to share the nearly em passy(http//en. wikipedia. rg/wiki/Protagonist). Character Analysis- a systematic investigation of the personality of an individual with special attention to psychologic defenses and motivations, usually under taken to amend behavior(http//medical-dictionary. thefreedictionary. com/character+analysis). Trait- A distinguishing feature, as of a persons character(http//www. th efreedictionary. com/trait). Dragon Rider- A Dragon Rider is a person, extremely low frequency or Human, bonded by thought with a Dragon. A Dragon Rider is identified by the incandescence palm, the Gedwey Ignasia. In the Ancient Language dragon rider is Shurtugal(http//www. shurtugal. com/wiki/index. hp5/Dragon_Rider). Urgal- Urgals were a race of sentient creatures that inhabited Alagaesia. pressure by Durza into the service of Galbatorix, they were considered evil by most humans, but were not inherently so. Though most were uneducated, they made up with brute force, exceptional fighting and commanding skills. They were used as expendable electrical shock troops of Galbatorixs army. The Urgal language was a simple, guttural language. Only a few phrases were known to outsiders, and most of them were cerebrate to war and fighting. Also, they were one of the races capable of using magic(http//inheritance. wikia. com/wiki/Urgal).Varden- The Varden were members of an alliance that opposed the rule of major power Galbatorix and his Empire. They consisted mainly of men and dwarves, though there was a conjunction between the Varden and the elves, as well. The Varden also enlisted the aid of a group of magicians known as the Du Vrangr Gata (translated The Wandering Path). The Surdans are also known to aid the Varden in transporting supplies and harbor those who wish not to fight(http//inheritance. wikia. com/wiki/Varden). Razac- The Razac (or Lethrblaka when full-grown) were one of the several ancient races that followed the humans across the sea to Alagaesia.They were a race that fed on humans and likely came from the same homelands. Razacs breath have the power to inactivate humans in a dream-like state, however, it barely clouds the minds of dwarves and is ineffective against elves altogether(http//inheritance. wikia. com/wiki/Razac). Alagaesia- Alagaesia is a large continent with alter climate and terrain, home to a wide number of creatures such as humans , elves, dwarves, Urgals and dragons. Several of the races inhabiting Alagaesia, including humans, elves, and Urgals, were not aboriginal to the land, having migrated to Alagaesia in centuries past(http//inheritance. ikia. com/wiki/Alaga%C3%ABsia). The Spine- The Spine was a mountain range that ran down the west coast of Alagaesia. It had only one major pass, along the Toark River, which isolated the coast. Most people in the Empire tutelageed the Spine and the danger it represented, in particular since Galbatorix lost nearly half his army in it during his campaign against the Dragon Riders. After this incident, hardly anyone dared to venture near to this dangerous mountain range(http//inheritance. wikia. com/wiki/The_Spine). Chapter 2 This part of the discussion highlights the different traits of Eragon.Background of Eragon Eragon is the main protagonist of the Inheritance Cycle, written by Christopher Paolini. Eragon is a male, the first in a new generation of Dragon Riders. He was trained by Brom an old story teller from his village and Oromis, and was chosen by Saphira, a blue dragon, to be her Rider. Traits of Eragon Brave Bravery is the condition or quality of being unfearing courage(http//www. thefreedictionary. com/bravery). As a Spanish matador once said, Bravery is believing in yourself, and that thing nobody can learn you. (El Cordobes, 1936), being brave is having trust in yourself.It is the ability to confront fear, pain, risk/danger, uncertainty, or intimidation. Eragon is a brave person. The deer he was hunting had led him deep into the Spine, a range of untamed mountains that extended up and down the land of Alagaesia. Strange tales and men often came from those mountains, usually boding ill. Despite that, Eragon did not fear the Spinehe was the only hunter near Carvahall who dared track game deep into its craggy recesses. Eragons bravery is also proven when he battled with his enemies like Shade, Urgals, and Razac which arent easy to kil l.Vigilant precaution the ability to maintain attention and alertness over prolonged periods of time(http//en. wikipedia. org/wiki/Vigilance). organism vigilant is being alert. hotshot of Eragons trait is being vigilant. It is proven in the first chapter of the novel. When Eragon saw a polished blue stone and decided to pick it. But before he picked the stone, he watched for danger for several long minutes, but the only thing that moves was the mist. Cautiously, he released the tension from his bow and moved forward. Moonlight cast him in pale shadow as he stopped before the stone.He nudged it with an arrow, then jumped back. Nothing happened, so he warily picked it up. This only proves that Eragon is vigilant in his actions. He makes sure that nothing dangerous will happen to him if he picks up to blue stone he saw in the Spine. Kind macrocosm kind is a way of living that keeps giving long after the kind thoughts, words, and actions have taken place. Kindness is a force without force, and it goes well beyond manners to the very heart of how people rate and treat one another. Kindness is the act or the state of being kind ie. arked by truth and charitable behavior, mild disposition, pleasantness, tenderness and bear on for others. It is known as a virtue, and recognized as a value in many cultures and religions(http//en. wikipedia. org/wiki/Kindness). Eragon is kind. It is proven in the 5th chapter of the story, when he spent a long time with the dragon. He untied it, set it on his shoulder, and went to explore the woods. The snow-laden trees watched over them like solemn pillars of a great cathedral. In that isolation, Eragon showed the dragon what he knew about the forest, not caring if it understood his meaning.It was the simple act of sharing that mattered. Eragon kept the dragon, he fed her, took care of her, and treated her like in a subtile way even if he doesnt know anything about the dragon. Responsible Responsibility is a traffic or an obliga tion to satisfactorily perform or complete a task (assigned by someone, or created by ones own promise or circumstances) that one must adjoin, and which has a consequent penalty for failure(http//www. businessdictionary. com/ comment/responsibility. html). Responsibleit is one of the words that best describes Eragon.As he accepted his fate onto being a dragon rider, he also accepted its responsibilities, to care for Saphira, to rescue Arya, to help the Varden, and to fight the Empire. All of these responsibilities as the dragon rider were fulfilled finished his trait of being responsible. Determined A determined soulfulness will do more with a rusty monkey wrench than a loafer will accomplish with all the tools in a machine shop. (Robert Hughes, 1978). Determinedness is devoting full specialty and concentrated attention to(http//www. thefreedictionary. com/determinedness). Being determined is being strongly motivated to succeed.It is having a strong desire for success or exploi t Eragon is determined to fulfill his mission as the dragon rider that will save Alagaesia from the evilness of King Galbatorix. And because of his determinedness, he works hard to learn about sparring, his enemies, the ancient language, and how to use his magic properly through his teacher, Brom in order for him to be successful in his mission of killing his enemies. Persevere Most of the most-valuable things in the world have been accomplished by people who have kept on assay when there seemed to be no hope at all.. (Dale Carnegie, 1981). attention is steady persistence in a course of action, a purpose, a state, etc. , especially in spite of difficulties, obstacles, or discouragement(http//dictionary. reference. com/browse/perseverance). Perseverance falls under the larger category of courage because it often involves continuing along a path in the midst of and after having faced opposition and perhaps failure. Perseverance involves the ability to seek a goal in spite of obstacl es. Eragon is a persevere dragon rider. Being persevere, he continues his journey to fulfill his mission even if there are many obstacles along his way.In the first part of the story, Eragon was attacked by the opponents which caused him to get a lot of wounds. There was also a time when Urgals under the command of the Shade, Durza captured Eragon and imprisoned him. In spite of facing these challenges/obstacles, Eragon still continues to stand and doing his best for his duties to be fulfilled. Chapter 3 Conclusion by character analysis, the researchers have shown the traits of the main protagonist in Christopher Paolinis Eragon. The traits of Eragon are proven through the use of different references. He is brave for having the courage to confront fear or danger.He is vigilant for maintaining attention and alertness over prolonged periods of time. He is kind for sharing the goodness in his heart and having concern to others. His sense of responsibility is shown through the tasks th at were given to him because he fulfilled those tasks. He is determined for devoting his full strength and attention to his mission and for desiring success to it. And lastly, he possesses perseverance because he continues to go on to fulfill his tasks even if there are many obstacles along the way. Eragon is the protagonist or hero in the story.The researchers therefore reason that he possesses good traits as the main character. References Paolini, C. (2002). Eragon. New York Alfred A. Knopf publishing house. Christopher Paolini Retrieved February 10, 2011, From http//en. wikipedia. org/wiki/Christopher_Paolini. About the Author Retrieved February 10, 2011, From www. Alagaesia. com. Eragon Summary Retrieved February 10, 2011, From http//www. wikisummaries. org/Eragon. Protagonist Retrieved February 15, 2011, From http//en. wikipedia. org/wiki/Protagonist. Character Analysis Retrieved February 15, 2011, From http//medical-dictionary. hefreedictionary. com/character+analysis. Trait Retrieved February 15, 2011, From http//www. thefreedictionary. com/trait. Dragon Rider Retrieved February 15, 2011, From http//www. shurtugal. com/wiki/index. php5/Dragon_Rider. Urgal Retrieved February 15, 2011, From http//inheritance. wikia. com/wiki/Urgal. Varden Retrieved February 15, 2011, From http//inheritance. wikia. com/wiki/Varden. Razac Retrieved February 15, 2011, From http//inheritance. wikia. com/wiki/Razac. Alagaesia Retrieved February 15, 2011, From http//inheritance. wikia. com/wiki/Alaga%C3%ABsia.
Sunday, May 19, 2019
Plato V/S Aristotle Philosophies
The questions that were posed Plato or Aristotle, What be the differences in the philosophies of Plato and Aristotle? Which philosophy might have been the better one to live by in the date? Give examples and details to support your argument. Plato, who was the most famous student of Socrates, thought resembling Socrates and was non happy with the Athenian society as it was. Plato was even much upset with the Athenian society because they had his teacher send to expiry even though it was reported that many of the Athenians were sorry for having done this. Hunt et al, 88) Both Socrates and Plato were republicans. He called democracy a charming form of government. In his dialogue The Republic, Plato is said to be a blue print for a perfect society. In it he talks about justice, statesmanship, ethics and politics. He did not believe that justice could be achieved through democracy. It is democracy that he blamed for the death of his teacher. (90) He wanted the Republic to warn t he plenty of Athens that they needed a salutary education, mention for the law and leaders of their society.He felt there should be a stronger community base like it was out front the wars and the arrival of this democracy. The way people were able to understand what he called the truth of the Forms was how he would stray people in his perfect society. Plato felt that women could rank as high as men since they had the selfsame(prenominal) virtues. He felt that these people could live together in the same barracks area and could have wind to make more enlightened children. Plato felt that society should be run by someone from this common area.The ones who were the highest in enlightenment would be the ones to govern over the people. They would be called philosopher-kings. In his school that he named the Academy, afterwards Academus or Hecademus, a mythical hero who had a cult following, Plato taught that people are born with knowledge. He said it was not learned after birth . It was only recalled. He said that knowledge is only in the mind. There is supposed to be a higher level that people are supposed to feature over and above that of the senses. This is needed because the senses have a tendency to deceive.There is a need for a higher plane of existence called Forms. These Forms allow the individual to better understand the ultimate truth. Aristotle, even though he was taught by Plato had different ideas about how things should go. Aristotle was said to have been the tutor for Alexander the Great. He was as well as a biologist that was called a polymath, which means he knew much about everything. He too started his own school. It was called Lyceum. He did not believe that there was an Essence or Form. He believed in nothing still the facts.Where Plato said that knowledge was born inside everyone, Aristotle said that knowledge comes from regard. The thought is that Rationalism knowledge comes from experience and Empiricism knowledge (posterior) comes after experience. Aristotle also had a great confidence in sense perception. He felt that there are principles that come from experience. His beliefs would not allow him to believe that there is a man of Forms that transcends time and space. He said that if there were Forms and absolutes they would have to be found in the thing itself.He is crush known for his ideas that logic is the way to win an argument rather than being persuasive. To him, looking at things in their natural settings would allow one to find out more about it. Aristotle did not regain that women could be equal to men because of his false idea about biology. And he felt that slavery was not a bad thing. Aristotle did not believe that all people had the rational part that should rule in a compassionate. (91) He like Plato did not think it was a good idea for well-ordered people to run the government.He also felt that better people were needed to handle this. (91) consort to Aristotle people should be abl e to train their minds to overcome the impulses that people have. He was not telling people to not do what they felt good doing. He just wanted them to think things through before they did them. The intellect of the human mind should be able to outshine the human will. The mind to Aristotle was the god-like part of the human and it was the part that should and could find the balance needed to keep what you want from ruling your common sense.Plato put the persons will and self-control in the hands of someone else. Aristotle on the other hand felt that man is in charge of his own destiny and makes the ultimate decision to do something or not. In our society today there is a basis for what Aristotle thought in the way of philosophy. Many in the West value the concept that self-control overrules wantonness. Since the basis for society prewar was in the form of deities and Platos school of thought is still seemingly based on a type of deity, maybe the best way for the people of that era to be was more along the lines of Aristotle.His was would cause the people to think more about what they were doing. This may have been the best way for the culture to retain its once prosperous status. This would open up the Athenians the opportunity to rule rather than be ruled. When one accepts the consequences for their own actions and think about what could happen if they do things a certain way, it is less likely that the situation will turn out badly. The parts, of his philosophy, that were not good for that time is the thoughts on slavery and women. This would not promote unity which is what was needed.Works citedhttp//www-history.mcs.st-and.ac.uk/Societies/Plato.html Hunt, Lynn, Thomas R. Martin, Barbara H. Rosenwein, Bonnie G. Smith. The fashioning of the West, Peoples and Culture, A Concise History. 3rd ed. Boston / New York. Bedford / Martin. 2013. Print
Saturday, May 18, 2019
Business Law Court Paper Assignment Essay
On November 5, 2008, I came to observe a proceeding in the King County lord Court where the opines name was Shaffer Catherine. I did observe the closing arguments and the boards apparent motion to the show window in a criminal proceeding where subject of the guinea pig was rapine in the second base leg. Mark Alan gong, as the defendant in the observed shimmy, was super charged with second degree plunder for punching a man named Jesse Gill at a wedding reception, and eventu in ally knocking him down to the ground.Bell was reckon to withdraw punched Gill because the latter was hence sexually harassing women at the wedding reception. Gill, with all freedom, also say to bedevil harassed Bells wife and in return he got punched in the facial expression by Bell. To stop the commotion caused by the harassment by d iodine Gill and the eventual punching against him, hatful at the wedding responded by calling the police. The state ended up charging Mark Bell for assault in the second degree for the alleged punching against.With Bell having been charged with assault in second degree in a criminal proceeding, it was a big surprise to me when Judge Jude Shaffer changed the case into civil genius because of self confession invoked by defendant Bell. At this point, the beg went to recess before bringing the jury back appear. While in court recess, we went to the defendants lawyer and asked him a couple of questions. I am non sure as to what the lawyers name but she was the alone one that was willing to talk to us ab reveal the case.The prosecutor simply walked out as soon as the court went to recess. The defendants lawyer told us that the trial has been going on for about both weeks then and that luckily the judge had decided that the defendant was not inculpatory to the second degree assault charge when we came to observe. The same lawyer also told us that she was still waiting for the jury to come out and decide whether or not Bell should enamo r the money back from the state, e. g. money he had incapacitated from work while in court, lawyer fees, parking fees, etc.The defendants lawyer gave us a very(prenominal) informative briefing and was very helpful. After talking to the defendants, lawyer the court resumed and the jury was brought into the courtroom. It was interesting to regulate them come right out and sit in a very organized manner. The defendants lawyer and the prosecutor both talked to the jury and explained their side of the argument. The defendants lawyer seemed to convince the jury that the state should pay Bell all of the money that he had woolly-headed as a result of being brought to court.After the prosecutor and the defendants lawyer got through with(p) explaining their views to the jury, the judge summarized parts of the case to the jury and concluded by saying that the defendant was not guilty to the second degree assault charge. The judge then asked the jury deuce questions. The jury could only s ay a simple yes or no to each question and nothing else. All twelve verbalise yes to each question. Soon after that the criminal case was dismissed by the court, happiness broke out for the defendant, his lawyer, and his family.The prosecutor quickly congratulated the defendants lawyer and walked out the court thereafter. Bell had about cardinal family members that were in the court. Including us, it was a total of 5 people listening to the case. This seemed odd to me because I had al routes horizon that a lot of people would be inside the court just like the movies and television shows. As we were leaving the court, we also congratulated the defendants lawyer and thanked her for the help. We asked the lawyer if we could get some documents explaining the case and what had happened during the two week trial.The lawyer gave us a case number and told us to go down to the sixth floor and use the com honkers they arrest there to search documents using that case number. We did as she had said, but regrettably we found no documents as they were not yet available for this case. Part 2 Opinion This case was a very interesting event. I always knew but never truly accepted the detail that any offense in this country could actually go to court. Protecting yourself or new(prenominal)s could still get you into trouble and you could still be made to answer in the court of law. Mr.Bell was found by police to be the one assaulting but his act as came out of determination was in defense of other(a) persons including his wife from being harassed. His act of punching Gill, the harassing person, was seen by the police as an act of assault and for which rationalness he was charged with a crime of assault in second degree. But since Bell was doing what was everyday in humans, as found by court, in order to assert their right of defend other peoples honor or person, then, I imagine the courts decision to change from criminal case to civil case must not be baseless after wall.The court may have found that there was no criminal intent on the part of the Bell to be charged of the crime since Bell was fully exercising a valid of defending other person including his wife or primarily defending first his wife before the others. Indeed how could he be charged something when he was not doing the punching to attach Gill for nothing but was using necessary the means to springy Gill that was already out of his mind or perhaps committing a crime in devising the harassment? Having right people to help you out and protect you in a court case or situation must be interesting because ones honor or conversance is at stake.I mean the defendant could either win or lose the case. If he loses he goes to prison or if he wins he gets free. If Mr. Bell did not have a good lawyer to help him out, he would have been totally charged with assault and would then have to face sombre consequences. To have observed the defendants lawyer in helping Mr. Bell out with all the a ccusations against him was rather touching. So much pathos has to be used in order to overcome the positions on paper. In other words, the lawyer had to be emotional by having others imagine if they were in such a situation.I think it is the human drama in court that made my court experience very much interesting although I may not agree with the outcome of the courts decision. My resolve for disagreeing in the decision is that I would be mad if my girlfriend was sexually harassed or other women in front of me but I find not a valid excuse to arrange a hand on someone else for mere harassment. I dont believe that I should have the right to defend someone else, unless they are being physically hurt and even then the best thing to do is to stop the action and not cause more damage.In my understanding, Mr. Bell was never once touched during the wedding rather he started the fight and the damage by punching another guy. As bad as it sounds to a persons pride or ego, Mr. Bell should h ave totally been charged with assault. I thought that the attorney did a pretty decent job defending Mr. Bell. I mean, given the fact that I am against the outcome of the court, the lawyer must have through a good job to get him out of the trouble that I think he should be in.Perhaps my understanding was not supported by evidence as presented or controverted by the lawyer as there is the possibility that the fight did not really start from Mr. Bell and that he was playing in defense of his wifes honor. If such was the real case borne by evidence, I believe there should be justification for the dismissal of the charge against Bell. To believe this latter version would seem tenable because the punch was in direct response to the dishonor caused to the wife due to the harassment.I mean punching a man by another to the defend a wifes honor need not me unreasonable enough to justify the assault. But then as I said, this latter version is contrasting from my own understanding as stated earlier. The trial could be described as well go across with the defense lawyer, prosecutor, the judge and the jury having performed their functions in the case. But again, since I do not agree with the decision due to my own understanding of the facts, I feel not emotionally at ease with the way things have come about.However, the fact that the criminal proceeding was change to civil proceeding and the fact that the judge had the agreement from the jury on the questions propounded, it stands to good reason that perhaps justice is served upon the accused or defendant. The fact the lawyer also mentioned about the defendant having to claim the lost amount of money or amends against as a result of Bell being dragged to court, may be taken as a reason to merit the strength of the decision acquitting the defendant.To sum it all, I believe the difference of my opinion as to what should have been done by court and my disagreement with the result would have to be considered really on the basis of what really happened as borne by evidence. Since I may not know the complete facts if my only basis is my observation, I believe I should have the access to more information that may have to answer questions in my mind as to the result of this case. I believe the case is important or any even any case that would merit the attention of the judge and jury.To be brought to court which could put ones life, honor, property or person at stake must be of prevailing importance. Nobody wants to have a guilty person set free but nobody wants to see an innocent person also to be in jail. Work cited TITLE LXII, Criminal Code, Chapter 631, Assault And relate Offenses, Section 6312, www document URL, http//www. gencourt. state. nh. us/rsa/html/LXII/631/631-2. htm, Accessed November 18, 2008
Friday, May 17, 2019
Careercup Top 150 Questions
Cracking the Technical oppugn by Gayle Laakmann, Carg iodinrCup. com 150 Technical interrogate Questions and Solutions, writ ecstasy by experts. PLUS Behind the scenes look at Google Microsoft, virago and Yahoo hearings. Interview war Stories the view from the new(prenominal) side. Advice on how to prelude 24 types of c wholly into question questions. Copyright Information Copyright 2009 by Gayle Laakmann All rights reserved exclusively for emailprotected google. com www. carg peerlessrcup. com Table of Contents Introduction Practice Interviews. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 The Microsoft Interview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 The Amazon Interview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 The Google Interv iew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 The Yahoo Interview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Interview warf be Stories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Interview Questions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 drop Mathematics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Arrays & Hash Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 snatch Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Brain Teasers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 C / C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Counting and Combinatorics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Debugging Existing Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Java. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Large Scale & Memory Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 relate Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Low Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Matrix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4 2009 CAREERCUP exclusively for emailprotected google. com Table of ContentsChapter 15 Chapter 16 Chapter 17 Chapter 18 Chapter 19 Chapter 20 Chapter 21 Chapter 22 Chapter 23 Chapter 24 Ne t failing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 tendency Oriented Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Probability and Randomness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Softw be and System Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 categorisation and Searching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Stacks and Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Threads And Locks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Trees and Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 2009 CAREERCUP 5 Practice Interviews Studying religious services, but nonhing stand prepare you similar the real social function. sever each(prenominal)y CareerCup queryer has infractn over a hundred consultations at Google, Microsoft, or Amazon. To nail your interview, dumb put set down with a trained interviewer and live their experienced feedback. See www. lifecup. om/interview for more details. One hour Interview with Real Interviewers Our interviewers volition give you a real interview, provided a uniform youd bem lend oneself at Google, Microsoft or Amazon. Well block push through you on the identical types of questions t chapeau they do. Well grade you the aforementioned(prenominal) way they do. How send word we do this? Weve d adept over deoxycytidine monophosphate interviews severally for these companies. Weve cover songed continues. Weve been part of their hiring citizens committees. We last what they essential. Well Also Give You An . mp3 recording of your interview. Feedback on whither you shined and where you struggled. Specific put forwardions on how to improve.Instructions on how to approach tough businesss Lessons on what interviewers look for in your computer edict. A ingrained Interview A typical interview includes a brief proveion of your resume and one or more technological questions. Each interview leave do coding via a shared document. When the interview is completed, well give you immediate feedback on how you did date its noneffervescent fresh in your mind. Later that day, youll pay back an mp3 of the interview to refresh your memory. Schedule Your Interview Today See http//www. careercup. com/interview for pricing and details 6 2009 CAREERCUP xclusively for emailprotected google. com The Microsoft Interview Microsoft lacks smart populate. Geeks. People who are passionate around technology. You probably wont be tested on the ins and outs of C++ APIs, but y ou will be expected to indite code on the jump on. In a typical interview, youll show up at Microsoft at some clock in the daybreak and fill out initial paper work. Youll shake mop up a short interview with a recruiter where he or she will give you a sample question. Be nice to your recruiters while they whitethorn not evaluate your technical acquirements in depth, they rear fight for you to be conductd or not.Throughout the day, youll bear around from interviewer to interviewer, visiting all(prenominal) one in their office. exercising this age to look around and proceed a feel for what the squad culture. Interviewers are not allowed to share their feedback on you with new(prenominal)(a) interviewers, due to concerns of bias. Nonetheless, legion(predicate) sources indicate that some feedback is shared. When you complete your interviews with a squad, you might speak with a hiring manager. If so, thats a corking sign It insufficiencyly means that you passed the i nterviews with a particular police squad. Its now down to the hiring manDefinitely Prepare agers decision.You might get a decision that day, or it might be a week. After one week of no word from HR, send them a mately email bringing for a precondition update. Why do you want to work for Microsoft? In this question, Microsoft wants to unwrap that youre passionate nearly technology. A slap-up answer might be, Ive been using Microsoft software as long as I commode remember, and Im au and thentically impressed at how Microsoft creates manages to create a product that is universally surpasslent. For example, Ive been using Visual Studio recently to learn game programming, and its APIs are excellent. blood how this shows a passion for technologyWhats Unique Youll lonesome(prenominal)(prenominal) r apiece the hiring manager if youve by means of well, but if you do, thats a great(p) sign emailprotected google. com 2009 CAREERCUP 7 The Amazon Interview Amazons recruiting pro cess normally begins with one or two visit screens in which you interview with a ad hoc team. The engineer who interviews you will usually drive you to write simple code and read it aloud on the knell. They will require a broad set of questions to explore what areas of technology youre familiar with. Next, you aviate to Seattle for four or five interviews with one or two teams which cave in selected you based on your resume and phone interviews.You will involve to code on a whiteboard, and some interviewers will stress an other(a)(prenominal) skills. Interviewers are each assigned a specific area to probe and may seem really dissentent from each other. They can not see other feedback until they have submitted their own and they are disapprove from talk roughlying it until the hiring butting. Amazons bar raiser interviewer is charged with takeing the interview bar high. They attend superfluous training and will interview candidates outside their root word in order t o balance out the group itself.If one interview seems importantly harder and different, thats some kindredly the bar raiser. This somebody has both significant experience with interviews Definitely Prepare and veto power in the hiring decision. You Amazon is a web-based comp both, and will meet with your recruiter at the end of the day. that means that they care to the highest degree scale. Once your interviewers have entered their feedback, they will meet to discuss it. They will be the comm building blocky devising the hiring decision. go Amazons recruiters are excellent at following up with candidates, occasionally there are delays.If you havent heard from Amazon in spite of appearance a week, we press a friendly email. Make current you prepare questions in Large Scale. You beart need a background in distributed systems to answer these questions. Just answer the question for one system and then weigh, how does your solution change with multiple data processors? Add itionally, Amazon tends to ask a lot of questions that are based in mathematics and randomness. Whats Unique The Bar Raiser, who is brought in from a different team to keep the bar high. 8 2009 CAREERCUP exclusively for emailprotected google. com The Google InterviewThere are mevery scary stories floating around closely Google interviews, but its mostly vertical that stories. The interview is not terribly different from Microsofts or Amazons. However, beca mapping Google HR can be a little disorganized, we recommend being proactive in communication. A Google engineer performs the first phone screen, so expect tough technical questions. On your onsite interview, youll interview with four to six people, one of whom will be a lunch interviewer. Interviewer feedback is kept confidential from the other interviewers, so you can be assured that you enter each interview with blank slate.Your lunch interviewer doesnt submit feedback, so this is a great opportunity to ask honest questions. Written feedback is submitted to a hiring committee of engineers to stir a lock/no-hire recommendation. Feedback is typically broken down into four categories (Analytical Ability, Coding, Experience and Communication) and you are apt(p) a score from 1. 0 to 4. 0 overall. The hiring committee understands that you cant be expected to excel in e genuinely interview, but if multiple people raise the same red flag (arrogance, unworthy coding skills, etc), that can disqualify you.A hiring committee typically wants to see one interviewer who is an en olibanumiastic endorser. In other words, a packet with scores of 3. 6, 3. 1, 3. 1 and 2. 6 is better than all 3. 1s. Your phone screen is usually not a factor in the final decision. The Google hiring process can be slow. If you siret hear back within one week, politely ask your recruiter for an update. A lack of reply says nothing about your performance. Definitely Prepare As a web-based company, Google cares about how to pattern scal able system. So, authorise sure you prepare question from Large Scale. Additionally, umpteen Google interviewers will ask questions involving bit shifting and Bit Manipulation, so please brush up on these questions. Whats Different Your interviewers do not sham the hiring decision. Rather, they enter feedback which is passed to a hiring committee. The hiring committee recommends a decision which can bethough ra swear is spurned by Google exe omissionives. emailprotected google. com 2009 CAREERCUP 9 The Yahoo Interview Resume Selection & Screening While Yahoo tends to only recruit at the top 10 20 schools, other candidates can still get interviewed finishedYahoos job board (or better yet if they can get an internal referral). If youre one of the happy ones selected, your interview process will start off with a phone screen. Your phone screen will be with a senior employee (tech lead, manager, etc). Onsite Interview You will typically interview with 6 7 people on the same te am for 45 transactions each. Each interviewer will have an area of focus. For example, one interviewer might focus on databases, while another interviewer might focus on your understanding of computer architecture.Interviews will often be composed as follows 5 proceedings General conversation. Tell me about yourself, your projects, etc. 20 transactions Coding question. For example, instrument merge sort. 20 minutes System design. For example, design a erect distributed cache. These questions will often focus on an area from your past experience or on something your interviewer is curDefinitely Prepare rently working on. Decision At the end of the day, you will likely meet with a Program Manager or someone else for a general conversation (product demos, concerns about the company, your competing offers, etc).Meanwhile, your interviewers will discuss your performance and attempt to come to a decision. The hiring manager has the ultimate say and will weigh the demonstrable feedb ack against the negative. If you have take upe well, you will often get a decision that day, but this is not forever the case. There can be many reasons that you might not be told for several days for example, the team may feel it needs to interview several other people. Yahoo, nigh as a rule, asks questions about system design, so ground sure you prepare that. They want to cognise that you can not only write code, but that you can design software. arrogatet worry if you dont have a background in this you can still reason your way through it Whats Unique Your phone interview will likely be performed by someone with more influence, such(prenominal) as a hiring manager. Yahoo is also unusual in that it often gives a decision (if youre hired) on the same day. Your interviewers will discuss your performance while you meet with a final interviewer. 10 2009 CAREERCUP exclusively for emailprotected google. com Interview War Stories The View from the Other Side of the Front, by Pete r BaileyFor the eager candidate getting bustling for a big job interview, Cracking the Technical Interview is an invaluable reference, containing excellent coaching and put material that gives you an inside edge on the interview process. However, as you go over your old data twists text hand and drill yourself with stemmade discrete math flash cards, dont make the slip ones mind of thinking of the interview as a kind of high-pressure game show that if you just give all the right answers to the tech questions, you too can win a shiny new career (this week, on Who Wants to be a Software Engineer? While the technical questions on computer skill obviously are very important, the most important interview question is not cover in this guidebook. In fact, its often the single most important question in your interviewers minds as they wicket you in that little room. Despite the questions on polymorphism and heaps and virtual machines, the question they really want an answer to is W ould I have a beer with this guy? Dont look at me like that, Im serious Well, I may be embellishing a little, but hear me out.The percentage point Im trying to make is that interviewers, especially those that you might work with, are probably just as anxious as you are. Nonsense, you say, as a nervous young shamional, construeing your pants for lint while you keenness your fingernails, postponement for the interview team to show up in the front lobby. After all, this is the big leagues, and these guys are just waiting for you to slip up so they can rip you apart, laugh at your shrivel up corpse, and grind your career dreams to dust beneath the heels of their boots. Right? Just like pledge week, back in freshman year?Right? Hmmm? Nothing could be further from the truth. The team of developers and managers interviewing you have their own tasks and projects waiting for them, back at their own desks. Believe me, theyre hoping that all(prenominal) interview is firing to be the f inis one. Theyd rather be doing anything else. There might be a batch of upcoming projects looming on their calendar, and they need more manpower if theyre going to even have a prayer of making their deadline. But the last guy the agency sent over was a complete flake who railed about Microsofts evil for fractional an hour.And the one before that couldnt code his way out of a wet paper bag without using copy-and-paste. Sheesh, they think, where is HR getting these guys? How hard can it be to hire one lousy person? While they may not literally be asking themselves Would I have a beer with this guy (or gal), they are looking to see how well you would fit in with the team, and how you would fall team chemistry. If they hire you, youre all going to be spending a lot of time together for 11 2009 CAREERCUP exclusively for emailprotected google. com Interview War Stories he adjoining few months or years, and they want to know that they can rely on you and perchance even come to consi der you a friend and colleague. They want to know that they can depend on you. And as tempting as it might be to them to just settle and hire the next person who comes on, they know better. In many companies, particularly large U. S. companies, its harder to fire somebody than it is to hire somebody. (Welcome to the US Land of Lawsuits ) If they hire a dud, theyre stuck with them. That person might be unproductive or, even worse, a drain on the teams productivity.So they keep interviewing, until they find the right person. They know that its better to reject a groovy candidate than hire a bad one. Some of those interviews are real doozies. Once youve interviewed long replete, you build up a repertoire of horror stories. War stories, of candidates who looked promising on paper until the interviews went terribly, terribly wrong. These war stories are not only humorous theyre also instructive. Names have been changed to protect the innocent or honest ridiculous. zyxwvutsrqponmlk jihgfedcba ZYXWVUTSRQPONMLKJIHGFEDCBA emailprotected google. comkjlslen 0987654321+_=-)(*&%$ ,. /? ABCDEZYXW abcdeyxw asdsasdFGJwRXGs75rpqR3oFWHMJHp-RQ. LLqJ. H-rsdkktNNsasdf emailprotected google. com emailprotected google. com 2009 CAREERCUP 12 Interview War Stories Pop Divas Need Not Apply Leonard was a very promising C++ coder, three years out of college, with a square work history and an grandiose skill set. He proved on the phone screen that he was above-average technically, and so he was invited in for an interview. We needed a savvy C++ person to work on a piece of middleware that interfaced with our database, and Leonard seemed like a sure fit.However, once we started talking to him, things went south in a hurry. He spent most of the interview criticizing every tool and platform that we questioned him on. We employ SQL Server as our database? Puhleease. We were planning to switch to visionary short, right? Whats that? Our team used Tool A to do all our coding in? Unac cep confuse. He used Tool B, and only Tool B, and after he was hired, wed all have to switch to Tool B. And wed have to switch to Java, because he really wanted to work with Java, condescension the fact that 75 percent of the codebase would have to be rewritten.Wed thank him later. And oh, by the way, he wouldnt be making any meetings before ten oclock. Needless to say, we encouraged Leonard to seek opportunities elsewhere. It wasnt that his ideas were bad in fact, he was technically right about many things, and his (strong) opinions were all backed with solid fact and sound reason (except for the ten oclock thing we think he may have just been making a power play. ) But it was obvious that, if hired, Leonard wasnt going to play well with others he would have been toxic kryptonite for team chemistry.He actually managed to offend two of the team members during the forty-five minutes of his interview. Leonard also made the mistake of assuming that Code Purity and Algorithm dishfu l were ever so more important than a business deadline. In the real world, there are always compromises to be made, and knowing how to work with the business analysts is just as important as knowing how to refactor a blob of code. If Leonard would not have gotten along with other IT people, he definitely wouldnt have gotten along with the business phratry. Maybe you can get away ith hiring a Leonard if hes one of the go around ten coders in the world (he wasnt). But he was the crystalizeic failure example for the Would you have a beer with this guy? test. 13 2009 CAREERCUP exclusively for emailprotected google. com Interview War Stories What We Have Here is Failure to Communicate Trisha was a mid-level Java developer with a solid history of middleware and JSP work on her resume. Since she was local, we invited her in for an interview without a phone screen. When we started asking her questions, it quickly became obvious that Trisha was a woman of few words.Her answers were sho rt and often composed of yes/no responses, even to questions that were meant to start a dialog. Once she did start opening up, I still wasnt sure she was actually talking. I saw her lips moving, and heard mumbling sounds coming out, but it wasnt anything that sounded like English. Im not sure if Trisha was nervous or just shy, but either way, I had to ask her numerous propagation to repeat herself. Now I was the one getting nervous I didnt want to be the guy who ruined the interview, so I pulled back on my questions. The other folks in the room and I exchanged uneasy glances.We felt like we were on a Seinfeld episode. It was almost impossible to understand Trisha, and when she did speak up, her halting, un trusted, confused speech patterns made us feel more like code breakers than interviewers. I am not exaggerating to say that I did not understand a single answer she gave during the interview. Knowing, alone, isnt good enough. Youre going to be talking with other technical people, and youre going to be talking to customers, and sales reps, and Betty from Marketing. You will write something eventually, whether its documentation, or a project plan, or a requirements document.The word processor might correct your spelling, but it wont correct your lousy opus. The ability to communicate thoughts and ideas, in a clear, concise manner, is an absolutely invaluable skill that employers seek. The same goes for verbal communication. I used to work with a co-worker who doubledd the length of every meeting he was in, because he could not answer a question in less than ten minutes. Hey, Dennis, what time is it? Well, thats kind of interesting, because I just happened to be reading an article on cesium clocks and leap seconds and the history of the Gregorian Calendar and Ill spare you the rest. emailprotected google. com 2009 CAREERCUP 14 Interview War Stories You Can Count on Me, Just Not Until Early Afternoon Ahhh, 1999. The crest of the dot-com bubble, and the ti ghtest bray market in history. Our company was racing to expand its development team, and we would have hired a German Shepherd if it knew HTML. Instead, we wound up hiring Ian. We shouldve hired the dog. Ian was a cheerful, friendly guy who had a gift of natural charisma. He got along fantastically with all of the interviewers, and seemed very intelligent.Skillwise, he was adequate. He hadnt written a single line of computer code outside of his college courses, and didnt even have his own electronic mail address. When we gave Ian the chance to ask us questions at the end of the interview, he asked about flexible work hours, and how soon he could take vacation time. Instead of showing an interest in the career opportunities, or in companys growth prospects, he asked whether he could take the all-you-could-drink break room soda home with him. The questions grew more bizarre from there. Ian was very interested in our Legal Assistance benefit.He wanted to know if it covered the cost of filing lawsuits, if it covered him if he got sued himself, if it applied to any lawsuits he currently was involved in, and if he could theoretically use it to sue the company itself. He also asked us if he could use it to uphold him fix some unpaid speeding tickets. In any other year, that should have been it for Ian right there. But, in 1999, we were hiring anybody who was even remotely competent. Ian collected paychecks from us for eighteen months, and he was about as productive as a traffic cone.He usually sauntered into the office around ten-thirty with some sort of lame excuse (by my count, he had to wait for the cable guy sixteen times in a six-month period). He usually killed the morning by answering e-mail and playing ping-pong, before breaking for a two-hour lunch. After lunch, it was more pingpong, and maybe an hour of writing bad code, before bolting the office sometime around three. He was the dictionary translation of unreliable. Remember, your potential future tea m members need to know that they can rely on you. And they need to know that you wont need eternal supervision and hand-holding.They need to know that youre able to exercise things out on your own. One of the most important messages that you, as a candidate, can convey in your interview is hiring me will make your lives easier. In fact, this is a large part of the reason for the famously tough interview questions at pips like Amazon and Google if you can bobby pin that kind of unpredictable pressure in an interview, then you stand a good chance of being useful to them on real projects. To appoint a more subtle example, once I was on a four person team that was desperately trying to recruit new members to help work on an old pile of software.It was a real mess wed inherited a nasty ball of spaghetti, and we needed people who could wipe in, figure things out, and be part of the solution. There was one very smart fellow, Terry, who would have been a great asset for our team 15 2009 CAREERCUP exclusively for emailprotected google. com Interview War Stories but we didnt hire him, disdain his excellent technical and personal skills. It was because he insisted on meticulous written instructions for every tincture of the coding process.He wasnt going to make a suggestion or take any curtain raising or blow his nose, for that matter without a mile-long audit trail and a dozen signatures. While he insisted that he worked that way for reasons of quality (a defensible point), we got the impression that it had more to do with butt-covering, and we simply didnt have the time for that kind of bureaucracy. Terry would have been an excellent fit in a government or aero spot IT department, something that require ISO 9000 procedures. But he would have never fit into our team he would have been a burden, not an asset.emailprotected google. com 2009 CAREERCUP 16 Interview War Stories My Spider Senses are Tingling I can think of lots of interviews that just fell int o the general category of weird and uncomfortable The Java coder who seemingly considered hygiene optional, and had the interview room smelling like week-old blue cheese within ten minutes (my eyes were peeing). The young fresh-out-of-college graduate with a tongue piercing that kept tick-tick-ticking against his teeth as he talked (after half an hour, it was like Chinese water torture).The girl who wore an iPod through her interview, with the volume turned loud enough that she actually had to ask the interviewers to repeat themselves a few times. The poor, hyper-nervous fellow who was sweating like a marathon runner for half an hour. The girl who wore a T-shirt with an obscene political slogan to her interview. The guy who asked (seriously) at the end of his interview, So, are there any hot chicks in our department? Those are the interviews where we politely thank the people for their time, shake their hand (except for the sweaty guy), then turn to each other after the do or closes and ask did that really just happen?Nobody is saying that you have to be a bland, boring zombie in a Brooks Brothers suit and tie. Remember, the interview team wants you to be the one, but theyre also very worried about the possibility that youre going to be more of a distraction than an asset. Dont talk or behave in a way that will set off their early warning radar. Whether or not somebody bothers to behave professionally during an interview is often a very good indicator of what kind of teammate theyre going to be. primal social skills are part of the answer to Would I have a beer with this guy? , or at to the lowest degree, Will I mind working next to this guy for six months? From the interviewers point of view, theyre picking a neighbor that theyre going to live and work with 200 hours per week for predictable future. Would you really want a neighbor that smelled like a hog rendering plant? 17 2009 CAREERCUP exclusively for emailprotected google. com Interview Q uestions Study hard, practice and good luck How this Book is Organized The interview questions in this book are grouped into categories, with a page preceding each category offering advice and other information.Within each category, the questions are sorted by approximate level of difficulty. Solutions for all questions are at the back. How to Use this Book An effective interview is not about memorizing interview questions, but rather, about retaining an understanding of concepts and demonstrating your problem solving ability. Use these questions to find the gaps in your knowledge and to learn problem solving techniques that you can apply to new questions. Advice for Devs Your interview will be most likely not be conducted on a computer. Thus, when you practice the problems in this book, we recommend writing them down on paper first.Then, type your solution into the computer exactly as you wrote it and see how you did. Special Advice for SDETs Not only do SDETs have to be great tes ters, but they also have to be great coders. Thus, we recommend that you complete the coding problems in this book with an eye for testing them. Even when the question doesnt specifically ask it, you should ask yourself, how would I test this? Remember any problem can be an SDET problem. Suggestions and Corrections While we do our best to regard that all the solutions are correct, mistakes will be made. Moreover, sometimes there is no right answer.If youd like to offer a suggestion or correction, please submit it at http// xrl. us/ccbook emailprotected google. com 2009 CAREERCUP 18 Applied Mathematics How to progression CHAPTER-1 Many of the so-called Applied Mathematics problems read as thinker teasers at first, but can be worked through in a logical way. Just remember to rely on the rules of mathematics to develop an approach, and then to guardedly translate that idea into code. Example Given two military issues m and n, write a regularity to return the first turning r th at is dissociative by both (e. g. , the least putting surface multiple).The arise What does it mean for r to be divisible by m and n? It means that all the primevals in m must go into r, and all primes in n must be in r. What if m and n have primes in common? For example, if m is divisible by 35 and n is divisible by 37, what does this mean about r? It means r must be divisible by 37. The Rule For each prime p such that pa m (e. g. , m is divisible by pa) and pb n, r must be divisible by pmax(a, b) The Algorithm limn q to be 1. for each prime bet p less than m and n find the largest a and b such that pa m and pb n let q = q * pmax(a, b) return qThings to Watch Out For 1. 2. Be careful with the difference in precision among floats vs. doubles. Dont assume that a value (such as the slope of a line) is an int unless youve been told so. Prime Numbers 1. 2. every number can be written as a product of primes. Example 504 = 23 * 32 * 7 f x is divisible by y, then every prime fac tor in y must be found in x. Example If 504 is divisible by y, then y could be 168 (23 * 3 * 7), or 21 (3 * 7), or 4 (22), or many other things. Y could not, however, be equal to 10 (5 * 2), since 5 is not found in x 19 2009 CAREERCUP exclusively for emailprotected oogle. com Applied Mathematics CHAPTER-1 1. 1 Write a method to buzz off the nth Fibonacci number _______________________________________________________________________pg 69 1. 2 Write a method to count the number of 2s between 0 and n. EXAMPLE insert 35 output 14 list of 2s 2, 12, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32 _______________________________________________________________________pg 70 1. 3 Given two lines on a Cartesian plane, arrange whether the two lines would intersect. _______________________________________________________________________pg 74 1. Given two squares on a two dimensional plane, find a line that would cut these two squares in half. _____________________________________________________ __________________pg 75 1. 5 Write an algorithmic program which computes the number of trailing zeros in n factorial. EXAMPLE foreplay 11 output 2 (11 = 39916800) _______________________________________________________________________pg 76 1. 6 Write a hunt down that adds two numbers. You should not use + or any arithmetic operators. _______________________________________________________________________pg 77 1. Write a method to implement *, , / operations. You should use only the + operator. _______________________________________________________________________pg 79 1. 8 Design an algorithm to find the kth number such that the only prime factors are 3, 5, and 7. _______________________________________________________________________pg 81 1. 9 A circus is conception a hover routine consisting of people standing atop one anothers shoulders. For practical and aesthetic reasons, each person must be both shorter and lighter than the person below him or her.Given the heights and weights of each person in the circus, write a method to compute the largest possible number of people in such a tower. EXAMPLE Input(ht, wt) (65, 100) (70, 150) (56, 90) (75, 190) (60, 95) (68, 110) Output The longest tower is length 6 and includes from top to merchantman (56,90) (60,95) (65,100) (68,110) (70,150) (75,190) _______________________________________________________________________pg 84 1. 10 Given a two dimensional graph with 6000 points on it, find a line which passes the most number of points. ______________________________________________________________________pg 86 2009 CAREERCUP 20 Arrays & Hash Tables How to Approach CHAPTER-2 While not all problem can be solved with a hash table, a shocking number of interview problems can be. Keeping track of which items youve already seen? Hash table. Needing a way to efficiently look up data? Hash table. The list goes on and on. You should become very extremely comfortable with hash tables how to implement them and how to use them. Hash Tables A hash table is a data structure that associates depicts with values for O(1) lookup.Hash tables are frequently, though not always, implemented with an line up. A simple implementation of a hash table that hashes a string to a Person is as follows kinsperson HashTable Person data = new PersonMAX_HASH_KEY int getId(string s) /* return a key for this string */ bool contains(string key) int id = getId(key) if (data247) return true return false void insert(string s, Person p) datagetId(s) Note This implementation does not handle collision. Collisions can be handled by chaining (eg, using a tie in list), or a mannikin of other ways. Vector (Dynamically Resizing Array)A vector, or a dynamically resizing array, is an array that resizes itself as needed while still providing O(1) access. A typical implementation is that when a vector is full, the array doubles in size. Each doubling takes a long time (O(n)), but happens so rarely that its asymptotic time is still O(1). 21 2009 CAREERCUP exclusively for emailprotected google. com Arrays CHAPTER-2 2. 1 Suppose we have an array a1, a2, , an, b1, b2, , bn. Implement an algorithm to change this array to a1, b1, a2, b2, , an, bn. _______________________________________________________________________pg 87 . 2 Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE One or two additional variables is fine. An limited copy of the array is not. FOLLOW UP Write the test cases for this method. _______________________________________________________________________pg 88 2. 3 You are given an array of integers (both positive and negative). Find the continuous sequence with the largest sum. Return the sum. EXAMPLE input 2, -8, 3, -2, 4, -10 output 5 eg, 3, -2, 4 _______________________________________________________________________pg 90 2. Design an algorithm to find all pairs of integers within an array which sum to a specif ied value. _______________________________________________________________________pg 91 2. 5 An array A1 n contains all the integers from 0 to n except for one number which is missing. In this problem, we cannot access an entire integer in A with a single operation. The elements of A are pay offed in binary, and the only operation we can use to access them is fetch the jth bit of Ai, which takes constant time. Write code to find the missing integer. Can you do it in O(n) time? ______________________________________________________________________pg 93 2009 CAREERCUP 22 Bit Manipulation How to Approach CHAPTER-3 Bit manipulation can be a scary thing to many candidate, but it doesnt need to be If youre shaky on bit manipulation, we recommend doing a couple arithmetic-like problems to boost your skills. Compute the following by hand 1010 0001 1010 1 1010 + 0110 10011001 0xFF 1 11001010 1001 & 1100 0xAB + 0x11 If youre still uncomfortable, examine very careful what happens when yo u do subtraction, addition, etc in base 10. Can you repeat that work in base 2? Things to Watch Out For Its really easy to make mistakes on these problem so, be careful When youre writing code, stop and thinking about what youre writing every couple lines. When youre done, check through your entire code. If youre bit shifting, what happens when the digits get shifted off the end? Make sure to think about this case to ensure that youre handling it correctly. 1 & 0 = 0 1 0 = 1 1 0 = 1 0 & 1 = 0 0 1 = 1 0 1 = 1 1 & 1 = 1 1 1 = 1 1 1 = 0 And (&) 0 & 0 = 0 Or () 0 0 = 0 Xor () 0 0 = 0 Left Shift x 2 = 00000110 00011001 4 = 00000001 exclusively for emailprotected oogle. com 23 2009 CAREERCUP Bit Manipulation CHAPTER-3 3. 1 Write a function int BitSwapReqd(int A, int B) to determine the number of bits required to convert integer A to integer B. EXAMPLE _______________________________________________________________________pg 94 3. 2 If you were to write a program to swap odd an d even bits in integer, what is the minimum number of instructions required? (eg, bit 0 and bit 1 are swapped, bit 2 and bit 3 are swapped, etc). EXAMPLE _______________________________________________________________________pg 95 3. 3 Write a method which finds the maximum of two numbers.You should not use if-else or any other comparison operator. EXAMPLE _______________________________________________________________________pg 96 3. 4 Given a (decimal e. g. 3. 72) number that is passed in as a string, print the binary representation. If the number can not be represented accurately in binary, print ERROR _______________________________________________________________________pg 97 3. 5 You are given two 32-bit numbers, N and M, and a two bit positions, i and j. Write a method to set all bits between i and j in N equal to M (eg, M becomes a substring of N find at i and starting j).EXAMPLE _______________________________________________________________________pg 99 3. 6 Write a func tion to swap a number in model without temporary variables. ______________________________________________________________________pg 100 3. 7 Given an integer, print the next smallest and next largest number that have the same number of 1 bits in their binary representation. ______________________________________________________________________pg 101 input N = 10000000000, M = 10101, i = 2, j = 6 output N = 10001010100 Input 5, 10 Output 10 Input 10001010 Output 01000101 Input 31, 14 Output 2 2009 CAREERCUP 24 Brain Teasers Do companies really ask headland teasers? CHAPTER-4 While many companies, including Google and Microsoft, have policies banning brain teasers, interviews still sometimes ask these tricky questions. Advice on Approaching Brain Teasers Dont panic when you get a brain teaser. Interviewers want to see how you tackle a problem they dont expect you to immediately know the answer. Start talking, and show the interviewer how you approach a problem. In many cases, you w ill also find that the brain teasers have some connection back to fundamental laws or theories of computer science.If youre stuck, we recommend simplifying the problem. operate it for a small number of items or a special case, and then see if you can popularize it. Example You are trying to cook an bombard for exactly 15 minutes, but instead of a timer, you are given two ropes which burn for exactly 1 hour each. The ropes, however, are of uneven densities eg, half the rope length-wise might take only 2 minutes to burn. The approach 1. 2. 3. 4. 5. 6. 7. What is important? Numbers usually have a meaning behind them. The fifteen minutes and two ropes were picked for a reason. SimplifyYou can easily time one hour (burn just one rope). Now, can you time 30 minutes? Thats half the time it takes to burn one rope. Can you burn the rope twice as fast? Yes (Light the rope at both ends. ) Youve now learned (1) You can time 30 minutes. (2) You can burn a rope that takes X minutes in just X/ 2 minutes by lighting both ends. Work backwards if you had a rope of burn-length 30 minutes, that would let you time 15 minutes. Can you remove 30 minutes of burn-time from a rope? You can remove 30 min of burn-time from lasso 2 by lighting Rope 1 at both ends and Rope 2 at one end.Now that you have Rope 2 at burn-length 30 min, start homework the egg and light rope 2 at the other end. When Rope 2 burns up, your egg is done 25 2009 CAREERCUP exclusively for emailprotected google. com Brain Teasers CHAPTER-4 4. 1 Add arithmetic operators (plus, minus, times, divide) to make the following construction true 3 1 3 6 = 8. You can use any parentheses youd like. ______________________________________________________________________pg 103 4. 2 You have a 5 quart jug and 3 quart jug, and an unlimited supply of water (but no measuring cups). How would you come up with exactly four quarts of water?NOTE The jugs are inquisitively shaped, such that filling up exactly half of the jug would be impossible. ______________________________________________________________________pg 104 4. 3 There is a building of 100 floors. If an egg drops from the Nth floor or above it will break. If its dropped from any floor below, it will not break. Youre given 2 eggs. Find N, while minimizing the number of drops for the worse case. ______________________________________________________________________pg 105 4. 4 A bunch of men are on an island. A genie comes down and gathers everyone together and places a magical hat on some peoples heads (e. . , at least one). The hat is magical it can be seen by other people, but not by the wearer of the hat himself. To remove the hat, you must dunk yourself underwater at exactly midnight. If there are n people and c hats, how long does it take the men remove the crowns? The men cannot tell each other (in any way) that they have a hat. FOLLOW UP Prove that your solution is correct. ______________________________________________________________________p g 106 4. 5 There are 100 closed storage lockers in a hallway. A man begins by opening all the 100 lockers. Next, he closes every second locker.Then he goes to every third locker and closes it if it is open or opens it if it is closed (eg, he toggles every third locker). After his 100th pass in the hallway, in which he toggles only locker number 100, how many lockers are open? ______________________________________________________________________pg 108 2009 CAREERCUP 26 C / C++ How To Approach CHAPTER-5 A good interviewer wont demand that you code in a language you dont profess to know. Hopefully, if youre asked to code in C++, its listed on your resume. If you dont remember all the APIs, dont worryyour interviewer probably doesnt eitherWe do recommend, however, studying up on basic C++ syntax. Pointer Syntax int p = v = Foo int *p // Defines pointer. &q // Sets p to address of q. *p // Set v to value of q. *f = new Foo() // Initializes f. k = f-x // Sets k equal to the value of fs member variable. C++ Class Syntax class MyClass private double var exoteric MyClass(double v) var = v MyClass() double Update(double v) double ComplexUpdate(double v) var = v return v C++ vs Java A very common answer in an interview is describe the differences between C++ and Java. If you arent comfortable with any of these concepts, we recommend reading up on them. 1. 2. 3. 4. 5. 6. Java runs in a virtual machine. C++ natively supports unsigned arithmetic. In Java, parameters are always passed by value (or with objects, their references are passed by value). In C++, parameters can be passed by value, pointer, or by reference. Java has built-in food waste collection. C++ allows operator overloading. C++ allows multiple inheritance of classes. Thought Which of these might be considered strengths or weaknesses of C++ or Java? Why? In what cases might you choose one language over the other? 7 2009 CAREERCUP exclusively for emailprotected google. com C / C++ CHAPTER-5 5. 1 Wha t is the difference between a struct and a class? Where would you use each? ______________________________________________________________________pg 109 5. 2 Write a method to print the last ten lines of an input file using C. ______________________________________________________________________pg 110 5. 3 Compare and contrast a hash table vs. an STL map. How is a hash table implemented? If the number of inputs are small, what data structure options can be used instead of a hash table? _____________________________________________________________________pg 111 5. 4 How do a virtual functions work in C++? ______________________________________________________________________pg 112 5. 5 What is the difference between deep copy and shallow copy? Explain how you would use each. ______________________________________________________________________pg 113 5. 6 In a class, the new operator is used for allocating memory for new objects. Can this be done using malloc? If yes, how? If no, w herefore not? Are there any restrictions associated with the use of malloc in place of new? _____________________________________________________________________pg 114 5. 7 What is the significance of the keyword volatile in C? ______________________________________________________________________pg 115 5. 8 What is name covert in C++? ______________________________________________________________________pg 116 5. 9 Why does a destructor in base class need to be declared virtual? ______________________________________________________________________pg 117 5. 10 Write a method that takes a pointer to a boss structure as a parameter and returns a complete copy of the passed-in data structure.The Node structure contains two pointers to other Node structures. For example, the method signature could look like so Node* Copy(Node* root) Note Do not make any assumptions about the data structure it could be a tree, linked list, graph etc. Feel free to choose the language you are most comf ortable with (C or C++ are preferred) In addition to the function code, write a complete suite of unit tests for this problem. ______________________________________________________________________pg 119 5. 11 Write a smart pointer (smart_ptr) class. _____________________________________________________________________pg 120 2009 CAREERCUP 28 Counting and Combinatorics How to Approach CHAPTER-6 While some problems in this chapter are simply coding problems, understanding the mathematical solution will help you sanity check your solution. For example, if you know how many subsets there are of a set, you can check to make sure that your algorithm to print all subsets will give you the correct number of subsets. When computing the number of ways of doing something, think about doing it step by step. The following two examples will illustrate this technique.How many ways can you pick k elements from n elements, if order matters and elements are not replaced? Eg if we pick 5 different letters, abcde is considered to be different from edcba. The Approach We have n choices for the first draw. For the second draw, we only have n-1 since one is removed. Then n-2, . When we draw k times, we get down to n-k+1 choices on the last draw. So, n * (n-1) * (n-2)* * (n-k+1) The Solution n / (n-k) How many ways can you pick k elements from n elements, if order does not matter and elements are not replaced? Were now just throwing letters into a bucket. Picking a, b is the same thing as b, a.The Approach If you compare this problem to the previous one, weve essentially double (or triple, quadruple, etc) counted items. That is, abc, acb, bac, bca, cab, cba were all considered unique in the previous solution but now theyre considered the same. Just how many times has abc been included (in its other forms)? 3 times, since there are 3 ways of rearranging abc. In fact, every item has been included 3 times, when it should have been included just once So, we divide our previous answer by 3 (or, more generally, k ). We now get n / (k * (n-k) ). This solution is often written as n-choose-k or nCk. 9 2009 CAREERCUP exclusively for emailprotected google. com Counting and Combinatorics CHAPTER-6 6. 1 In how many different ways can a cube be painted by using three different colors of paint? ______________________________________________________________________pg 121 6. 2 Imagine a robot seance on the upper left hand corner of an NxN grid. The robot can only move in two directions right and down. How many possible paths are there for the robot? FOLLOW-UP Imagine certain squares are off limits, such that the robot can not step on them. Design an algorithm to print all possible paths for the robot. _____________________________________________________________________pg 122 6. 3 Write a method to compute all permutations of a string. ______________________________________________________________________pg 123 6. 4 Implement an algorithm to print all valid (eg, properly o pened and closed) combinations of n-pairs of parentheses. EXAMPLE input 3 (eg, 3 pairs of parentheses) output ()()(), ()(()), (())(), ((())) ______________________________________________________________________pg 124 6. 5 Write a method that returns all subsets of a set. ______________________________________________________________________pg cxxv 2009 CAREERCUP 30 Database How to Approach CHAPTER-7 You could be asked about databases in a variety of ways write a SQL query, design a database to hold certain data, or to design a large database. Well go through the latter two types here. Small Database Design Imagine you are asked to design a system to represent a schools registrar course information, departments, course enrollment, teachers, etc. What are the key objects? Student. Professor. Course. Department. How do they relate to each other? *NOTE Im going to make some assumptions here for the purposes of writing up this explanation.In your interview, dont make assumptions deal y our interviewer instead. Many-to-Many A course can depart to multiple departments, and each department can have multiple courses. So, create a separate table DepartmentCourse that acts as a pairing of the two. DepartmentCourse has just a department_id field and a course_id field. A student can be in multiple courses, a course can have multiple students. So, do the same as above and create a StudentCourse table. A course only has one prof. A professor can teach multiple courses. So, add a field professor_id to the Courses table. One-to-Many Large Database Design When designing a large, scalable database, joins (which are required in the above examples), are generally very slow. Thus, you must denormalize your data. mobilize carefully about what when data will be usedyoull probably need to duplicate it in multiple tables. 31 2009 CAREERCUP exclusively for emailprotected google. com Database CHAPTER-7 7. 1 Write a method to find the number of employees in each department when we h ave the following tables ______________________________________________________________________pg 126 7. 2 What are the different types of joins?Please explain how they differ and why certain types are better in certain situations. ______________________________________________________________________pg 127 7. 3 What is normalization? Explain the pros and cons. ______________________________________________________________________pg 128 7. 4 Draw a entity-relationship diagram for a database with companies, people, and professionals (people who work for companies). ______________________________________________________________________pg 129 7. 5 You have to design a database that can store terabytes of data. It should support efficient range queries. How would you do it? _____________________________________________________________________pg 130 Employees containing Emp_ID, Emp_Name and Dept_ID (Primary key) Departments containing Dept_Name and Dept_ID (foreign key) 2009 CAREERCUP 3 2 Debugging Existing Code How to Approach CHAPTER-8 Sometimes, in an interview, an interviewer asks you to look at a piece of code and identify the mistakes. We recommend the following approach 1. 2. 3. Examine the code and understand what its expected to do. Ask your interviewer what types of data its expected to handle, where itll be used, etc. hold off for syntax errors does everything type check? s the class declaration correct? Look for hot spots 4. 5. If you see float and doubles, check for precision errors If you see division, check for rounding errors If you see memory allocation, check for memory leaks If you see unsigned ints, check to see if the int might ever be negative If you see bit manipulation, check for correctness The normal case The boundary cases (null, 0, 1, MAX, etc) Run through the code with a few examples Does it do everything its expect to? For example, if the code is supposed to return everyone in a database under 21, does it only look for students ?Maybe it should be looking for teach-ers as well? Does it handle unexpected cases? What if it takes in a list and it has a loop? 6. Further Advice 1. 2. Look at the space and time complexitycan you improve it? Correct the mistakes in the code. But do so carefully Dont simply make changes until it works. Deeply understand the issues and then correct them. 33 2009 CAREERCUP exclusively for emailprotected google. com Debugging Existing Code 8. 1 Explain what the following code does ((n & (n-1)) == 0) CHAPTER-8 ______________________________________________________________________pg 131 8. Find the mistake(s) in the following code unsigned int i for (i = 100 i Other int foo() printf(here we are ) main() typedef Foo typedef Derived Derived_inst Derived_inst ii ii. foo() ______________________________________________________________________pg 133 2009 CAREERCUP 34 Games How To Approach CHAPTER-9 Sometimes interviewers ask these problems simply because theyre fun, but often, its a lso because game problems are enceinte on object oriented design. Gaming problems tend to be more free form and thus they give you the chance to demonstrate how you really code.Define Data Structures When implementing something so free form, ask yourself, Where can I define a class or a struct? When in doubt, define a new class or struct. It tells the interviewer that you care about the maintainability of your code. Validate Your Assumptions Be careful about making assumptions. Suppose youre asked to implement the word game Scrabble. Dont assume that the dictionary will be in Englishor even in that character set. It could be in any language Ask your interviewer lots and lots of questions so that you know what to implement. Are you solving this problem once, or many times?Sometimes the solution will change depending on whether or not your code will be called multiple times. For example, suppose youre asked to find all anagrams of a word. If youre calling this code just once, it may be fastest just to rearrange the letters and check if theyre in the dictionary. But, if youre going to call the code multiple times, its now fastest to precompute data by iterating through all the words in the dictionary. Can you generalize your code, or part of it? If you really want to go above and beyond, try writing your code as though it were a more reason case.For example, if youre trying to figure out if a tic-tac-toe board has a winner, you might suggest to your interviewer solving it for the more general NxN case. If you go down this path though, be warnedsometimes problems are trickier than they appear. Also, make sure you discuss this with your interviewer so he/she knows what youre doing. 35 2009 CAREERCUP exclusively for emailprotected google. com Games CHAPTER-9 9. 1 Design an algorithm to figure out if someone has won in a game of tic-tac-toe. ______________________________________________________________________pg 135 9. The Game of headmaster Mind is played as f ollows The computer has four slots containing balls that are red (R), yellow (Y), green (G) or blue (B). For example, the computer might have RGGB (eg, Slot 1 is red, Slots 2 and 3 are green, 4 is blue). You, the user, are trying to imagine the solution. You might, for example, guess YRGB. When you guess right color for the right slot, you get a hit. If you guess a color that exists but is in the wrong slot, you get a psuedo-hit. For example, the guess YRGB has 2 hits and one pseudo-hit. For each guess, you are told the number of hits and pseudo hits.Write a method that, given a guess and a solution, returns the number of hits and pseudo hits. ______________________________________________________________________pg 137 9. 3 There is an 88 cheater board in which two diagonally opposite corners have been cut off. You are given 31 dominoes in which a single domino can cover exactly two squares. Can you use the 31 dominos to cover the entire board? Prove your answer (by providing a n example, or showing why its impossible). ______________________________________________________________________pg 138 9. Find a way to arrange 8 queens on a chess board so that none of them share the same row, column or diagonal. ______________________________________________________________________pg 139 9. 5 Othello is played as follows Each Othello piece is white on one side and black on the other. On your turn, you place a piece on the board so that your color is facing up. You must pick a spot such that your opponents pieces are either on the left and the right, or on the top and the bottom. All of your opponents pieces on the line between two of yours are then turned over, to become yours. Your goal is to own the most pieces.Design the game Othello. Write a method to check whether someone has won the game. ______________________________________________________________________pg 141 2009 CAREERCUP 36 Java How to Approach CHAPTER-10 While Java related questions are found thro ughout this book, this chapter deals with questions about the language and syntax. You generally will not find many questions like this at the larger software companies (Microsoft, Google, Amazon, etc), which tend to avoid trivia based questions, but these questions are very common at many smaller companies. What do you do when you dont know the answer?If you dont know the answer to a question about the Java language, try to figure it out by doing the following (1) Think about what other languages do. (2) Create an example of the scenario. (3) Ask yourself how you would handle the scenario if you were designing the language. Your interviewer will likely be equallyor moreimpressed if you
Subscribe to:
Posts (Atom)