answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

#include<iostream.h>

void main()

{

int a[30];

clrscr();

int min=10000,temp=0,i,lev,n,noofc,z;

printf("please enter how many number");

cin>>n;

for(i=0;i<n;i++)

a[i]=0;

cout<<"enter value of root";

cin>>a[0];

for(i=1;i<=n/2;i++)

{

cout<<"please enter no of child of parent with value"<<a[i-1]<<":";

cin>>noofc;

for(int j=1;j<=noofc;j++)

{z=(i)*2+j-2;

cout<<"please enter value of child";

cin>>a[z];

}

}

for(i=n-1;i>=n/2;i--)

{

temp=0;

for(int j=i+1;j>=1;j=j/2)

temp=temp+a[j-1];

if(temp<min)

min=temp;

cout<<"temp min is"<<temp<<"\n";

}

cout<<"min is"<<min;

getch();

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program parse using brute force technique of top down parsing?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the difference between brute force search and heuristic search?

Brute force is a systematic approach. Heuristics use educated guesses, rules of thumb and common sense.


How do you break up cement?

Brute, manual effort. A sledgehammer or jack hammer are the two most common methods for a cement slab or sidewalk. Roadways need much bigger equipment.


Which of the following NOS logon restrictions is most likely to stop a hacker who is attempting to discover someone's password through a brute force or dictionary attack?

Number of unsuccessful logon attempts


What is the pseudo-code for finding all the factors of a positive integer?

The simple (brute-force) way to do it would be something like this: For every integer i from 2 to n-1 do: If n modulo i equals 0, output i. This would be very slow for large n (linear in the size of n, in the best case).


Explain the different searching techniques in c?

In computer science, a search algorithm, broadly speaking, is an algorithm that takes a problem as input and returns a solution to the problem, usually after evaluating a number of possible solutions. Most of the algorithms studied by computer scientists that solve problems are kinds of search algorithms.[citation needed] The set of all possible solutions to a problem is called the search space. Brute-force search, otherwise known as na&iuml;ve or uninformed, algorithms use the simplest method of the searching through the search space, whereas informed search algorithms use heuristic functions to apply knowledge about the structure of the search space to try to reduce the amount of time spent searching.

Related questions

What are the brute ranks in Halo 2 and how can you tell?

The ranks are- Brute Minor- Uses Brute Plasma Rifle. Brute Captain- Looks like a Minor except has a Red flag on shoulder.Uses Brute Shot. Brute Honor Guard- Has Honor Guard Helmet and Armor.Uses Brute Plasma Rifle or Brute Shot.


What does El Brute mean?

that of brute


What are the tools that can be used for assessing a local area network?

Depends if brute force is needed use a program called Brutus Ae2


What does el de brute mean?

that of brute


What does el te brute mean?

the brute you


How do you get the brute character on the multiplayer?

You dont there is no brute character


Is brute a verb?

Brute is not a verb. It's a noun.


When was Return of the Brute created?

Return of the Brute was created in 1929.


What is the ISBN of Return of the Brute?

The ISBN of Return of the Brute is 9780863276286.


When was Fruit Brute created?

Fruit Brute was created in 1975.


Difference between informed search techniques and uniformed search techniques?

Informed search techniques use domain-specific knowledge to guide the search process, focusing on exploring promising areas first. Uninformed search techniques, on the other hand, have no information about the goal and rely on blind exploration of the search space. Informed search techniques are typically more efficient than uninformed search techniques in finding solutions to problems.


What actors and actresses appeared in Brute Force - 2012?

The cast of Brute Force - 2012 includes: Brute Force Daughter of Force