1. In traversing a tree using Breadth First Search, the data structure used is :

Answer: Queue

Reply

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

Tags
Show Similar Question And Answers
QA->In traversing a tree using Breadth First Search, the data structure used is :....
QA->The search engine which apologized recently for results of image search of "Michelle Obama’, first lady of U.S.?....
QA->Identify the Indian search engine founded by 2 IITians from Delhi in 2006 which they called it as "Desi search engine.....
QA->A storage area used to store data to compensate for the difference in speed at which the different units can handle data is:....
QA->The GSTcouncil in November 2016 approved four tier tax structure under the Goods andServices Tax (GST). What is that four tier tax structure?....
MCQ-> Read the passage carefully and answer the questions given below it. Certain words/phrases have been given in bold to help you locate them while answering some of the questions. Long time ago, in a forest, there lived a young antelope. He was fond of the fruits of a particular tree. In a village bordering the forest, there lived a hunter who captured and killed antelopes for various reasons. He used to set traps for animals under fruit­bearing trees. When the animal came to eat the fruit, it would be caught in the trap. He would then take it away and kill it for its meat. One day, while visiting the forest in search of game, the hunter happened to see the antelope under its favourite tree, eating fruit. He was delighted. ‘What a big, plump antelope!’ he thought. ‘I must catch him. I will get a lot of money from selling his meat.’ Thereafter, for many days, the hunter kept track of the antelope’s movements. He realised that the antelope was remarkably vigilant and fleet footed animal that it would be virtually impossible for him to track him down. However, he had a weakness for that particular tree. The crafty concluded that he could use this weakness to capture him. Early one morning, the hunter entered the forest with some logs of wood. He climbed the tree and put up a machan (platform used by hunters) on one of its branches by tying the logs together. Having set his trap at the foot of the tree, he then took up position on the machan and waited for the antelope. He strewed a lot of iy ,ovef mrui bts eo rn2thoeig6round beneath the 11.004.3, tree to conceal the trap and lure the antelope. Soon, the antelope came strolling along. He was very hungry and was eagerly looking forward to his usual breakfast of delicious ripe fruits. On the tree­top, the hunter, having sighted him, sat with bated breath, willing him to come closer and step into his trap. However, the antelope was no fool. As he neared the tree he stopped short. The number of fruits lying under the tree seemed considerably more than usual. Surely, something was amiss, decided the antelope. He paused just out of reach of the tree and carefully began examining the ground. Now, he saw what distinctly looked like a human footprint. Without going closer, he looked suspiciously at the tree. The hunter was well hidden in its thick foliage, nevertheless the antelope, on close scrutiny, was now sure that his suspicions had not been unfounded. He could see a corner of the machan peeping out of the leaves. Meanwhile the hunter was getting desperate. Suddenly, he had a brainwave. Let me try throwing some fruit at him,’ he thought. So the hunter plucked some choice fruits and hurled them in the direction of the antelope. Alas, instead of luring him closer, it only confirmed his fears! Raising his voice, he spoke in the direction of the tree —”Listen, my dear tree, until now you have always dropped your fruits on the earth. Today, you have started throwing them at me! This is the most unlikely action of yours and I’m not sure I like the change! Since you have changed your habits, I too will change mine. I will get my fruits from a different tree from now on­one that still acts like a tree!’ The hunter realised that the antelope had outsmarted him with his cleverness. Parting the leaves to reveal himself, he I grabbed his javelin and flung it wildly at the antelope. But the clever antelope was well prepared for any such action on his part. Giving a saucy chuckle, he leapt nimbly out of the harm’s way.As mentioned in the story, which of the following can be said about the hunter ?
 ...
MCQ->What will be the output of the program? class Tree { } class Pine extends Tree { } class Oak extends Tree { } public class Forest1 { public static void main (String [] args) { Tree tree = new Pine(); if( tree instanceof Pine ) System.out.println ("Pine"); else if( tree instanceof Tree ) System.out.println ("Tree"); else if( tree instanceof Oak ) System.out.println ( "Oak" ); else System.out.println ("Oops "); } }...
MCQ-> Read the following passage carefully and answer the questions given below it.Certain words/phrases have been printed in bold to help you locate them while answering some of the questions.Princess Chandravati was very beautiful. She loved all kinds of ornaments and always wanted to wear the most precious and lovely jewels. Once, a jeweller came to the palace and gifted the king a wonderful diamond necklace. It glittered with big and small diamonds. It was certainly a very expensive necklace. The princess fell in love with it as soon as she saw it. So the king presented it to her. From that day on, the princess always wore that necklace, wherever she went. One day before going for a swim in the pond, she took the necklace off and put in the hands of her oldest and the most trustworthy servant. “Hold this and be careful. This is the most precious necklace in the whole world,” she said. The servant was an old woman. She sat under a tree, holding the ornament tightly and waited for the princess. It was a hot afternoon and the servant was very tired so she dozzed off .under the tree. Suddenly the servant felt that someone was tugging at the necklace and she woke up with a start. She looked around but no one was there and the necklace was gone. Scared out of her wits, the old servant started screaming. On hearing her scream the royal guards rushed to her. She pointed towards the direction in which the thief may have gone and the guards ran off that way. There was a poor and dim-witted farmer walking on the same road. As soon as he saw the royal guards running towards him, he thought that they wanted to catch him and started running. But he was not a strong man and could not outrun the hefty guards. The royal guards caught him in no time. “Where is it ?” they demanded, shaking him. “Where is what ?” the poor farmer stammered back. “The necklace you stole 1” thundered one of the royal guards. The farmer had no idea what they were talking about. He only understood that some precious necklace was lost and he was supposed to have it. He quickly replied, “I don’t know where it is now. I gave it to my landlord.” The guards ran towards the landlord’s house. “Give us the necklace right now !” the guards demanded of the fat landlord. “Necklace ? I don’t have any !” the stunned landlord replied. “Then tell us quickly who does,” demanded the soldiers. In order to get the royal guards off his back, the landlord pointed towards a priest who was walking by his house and said, “He does.” The guards now caught hold of the priest who was walking towards the temple and thinking about the lunch he had just eaten. The priest was stunned when one of the burly guards jumped on him and asked about the necklace. He remembered that the minister, Bhupati, was at the temple. He took the guards to the temple and pointed towards the praying minister, “I gave it to him,” he said. Bhupati too was caught and all four men were thrown in jail. The chief minister of the kingdom knew Bhupati well and was sure that Bhupati would never steal. He decided to find out who the culprit was. He hid near the jail where all four men were put and heard them talking. First, Bhupati asked the priest, “Panditji, why did you say that you gave the necklace to me ? I was quietly praying at the temple and now you have landed me in jail for no fault of mine.” The priest looked apologetic. He pointed towards the landlord and said, “I didn’t know what to say. He set the guards on me. I was simply passing by his house and was on my way to the temple.” The land lord looked at the priest sheepishly. Then he turned towards the poor farmer and yelled, “You lazy good-for-nothing man Why did you say that I had the necklace ?” The farmer, trembling under the angry gaze of all three men, said, “I was just walking home, The guards caught me and I did not know what to say.” On hearing, this conversation, the chief minister understood that all the four men were innocent. He immediately ordered the royal guards to search thoroughly, near the pond. The guards searched high and low till they saw something glinting on the tree. On the tree sat a monkey with the princess’ favourite necklace around his neck. It took a lot of coaxing and bananas before the monkey threw the necklace on the ground. The king apologised to all the four men and gave them gold coins as compensation. He requested his daughter to wear the necklace only indoors.Why did the king present the diamond necklace to his daughter ?
 ...
MCQ->There are three cities A, B and C. Each of these cities is connected with the other two cities by at least one direct road. If a traveller wants to go from one city (origin) to another city (destination), she can do so either by traversing a road connecting the two cities directly, or by traversing two roads, the, first connecting the origin to the third city and the second connecting the third city to the destination. In all there are 33 routes from A to B (including those via C). Similarly there are 23 routes from B to C (including those via A). How many roads are there from A to C directly?...
MCQ-> Read the following passage carefully and answer’ the questions. Certain words/phrases are given in bold to help you locate them while answering some of the questions.Since its creation in the 17th century, insurers have amassed policies in each class of risk they cover. Thanks to technology, insurers now have access to more and more information about the risks that individuals run. Car insurers have begun to set premiums based on how actual drivers behave, with “telematic” tracking devices to show how often they speed or slam, on the brakes. Analysts at Morgan Stanley, a bank, predict that damage to insured homes will fall by 4060% if smart sensors are installed to monitor, say, frayed electrical wiring. Some health insurers provide digital fitness bands to track policyholders’ vital signs— and give discounts if they lead a healthier life. But the data can °lily go so far. Even the safest driver can be hit by a falling tree; people in connected homes still fall off ladders, but the potential gains from smart insurance are  large. First, giving people better insights into how they are managing risk should help them change their behaviour for the better. Progressive, an American car insurer, tells customers who use its trackers where they tend to drive unsafely; they crash less often as a result. Second, pricing will become keener for consumers. The insurance industry made $338 billion in profits last year. More accurate risk assessment should result in lower premiums for many policyholders. Third, insurers should be able to spot fraud more easily, by using data to verify claims.But two worries stand out. One is a fear that insurers will go from being companies you hope never to deal with to ones that watch your every move. The other, thornier problem is that insurers will cherry pick the good risks, leaving some people without a safety net or to be taken care of by the state. Forgone privacy is the price the insured pay for receiving personalised pricing. Many people are indeed willing to share their data, but individuals should always have to opt in to do so. Some worry that this safeguard may not be enough; the financial costs of not sharing data may be so great that people have no real choice over whether to sign up. The second concern is the worry that more precise underwriting will create a class of uninsurable people, selected out of insurers’ businesses because they are too high a risk. For some types of cover, that would be a reasonable outcome. People who choose to drive like maniacs should have a hard time getting insurance. By the same token, it makes sense to offer rewards, in the form of discounts to premiums, to customers who behave well. Incentivising people to eat better, exercise regularly, drink in moderation and avoid smoking would reap huge health dividends. Where things get harder is with risks that individuals can not control. There are few things that people have less choice about than their genes. One option is to distort the market by requiring insurers to be blind to genetic data. In 2011, for example, Europe banned insurers from using gender to calculate annuities. Now that a man’s shorter lifespans are no longer taken into account that has led to lower payments. Until the interplay between nature and nurture is better understood, it is right to be cautious. Insurers should be able to take note of customers’ behaviour, but not exploit information from genetic testing. However, as data analysis and the understanding of genetics improve, that line will only become harder to hold.Which of the following can be said about the insurance industry ?
 ...
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use
DMCA.com Protection Status Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions