Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Question 1

i. What are the basic features of a stack data structure, explain with the use of an example?

ii. What is the significance of the stacktop in a stack?

iii. Suppose that you want to develop a program that accepts a postfix expression and asks values for variables in the expression. Then you need to calculate the answer for the expression according to the given values.

For example,
The postfix expression is ab+c*

Value of a is 2
Value of b is 3

Value of c is 5

The result is 25

(a) Write the pseudo code algorithm for the above problem.
(b) Implement the algorithm in Java.

Question 2

i. Explain in your own words what an algorithm is giving an example.

ii. Describe different methods of developing algorithms with examples.

iii. With the use of an example describe what sort of problems are more suitable to solve in an algorithmic manner.

iv. Compare and contrast three widely used notations in algorithm analysis with respect to time.

v. Find the time complexities for the following loops. You should clearly analyze each step and give reasons for your answer.

(a)

sum = 0;

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

for( j = 0; j < n * n; j++) sum++;

(b)               sum = 0;

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

for( j = 0; j < n * n; j++) sum++;

Question 3

i. Briefly describe the essential points to be satisfied in writing a recursive algorithm.

ii. Compare and contrast recursion vs iteration.

iii. Write a recursive pseudo code algorithm that returns the maximum among the first n
elements of an array.

iv. Write a recursive algorithm that prints all the permutations of the first n characters of a string. For example the call print ("ABC", 3) would print

ABC, ACB, BAC, BCA, CBA, CAB

v. Implement the algorithms written in part 3.3 and 3.4 in Java Language.

Question 4

i. Compare and contrast array structures with linked lists.

ii. Write a pseudo code algorithm to create a linked list with a header and insert five numbers to the list.

(a) Write a pseudo code algorithm to insert a new element between the 3rd and 4th elements.

(b) Write a pseudo code algorithm to delete an element in the middle of the linked list.

iii. Implement parts a andb in 4.4 using Java programming language.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92305289
  • Price:- $70

Guranteed 36 Hours Delivery, In Price:- $70

Have any Question?


Related Questions in Computer Engineering

Why regulated industries should be required to follow

Why regulated industries should be required to follow security standards. Provide 2 examples of industries that would fall under this category.

Question task 1 use examples from the readings or from your

Question: Task 1: Use examples from the readings, or from your own research, to support your views, as appropriate. Encouraged to conduct research and use other sources to support your answers. Be sure to list your refer ...

C programmingnbsphelp with a program positivec that include

***C PROGRAMMING***  Help with a program positive.c that include the following function: Void extract(int *a, int n, int *positive, int *size);  The function should use pointer arithmetic, not subscripting. The extract f ...

The marginal revenue and marginal cost functions for a

The marginal revenue and marginal cost functions for a monopolist firm that mines diamonds are given by:

I am struggling with this programmign exersice and would

I am struggling with this programmign exersice and would love to get some insight. any help would be greatly appreciated. Amanda and Tyler opened a business that specializes in shipping liquids, such as milk, juice, and ...

When i have a class that extends application public class

When I have a class that extends Application (public class Game extends Application) I can easily call it from my driver class by typing launch(Game.class). Now I have two other classes where one extends JFrame and the o ...

Can someone please help me with this pleasetaskthe purpose

Can Someone please help me with this please: Task: The purpose of this assignment is to empirically measure attributes for binary search trees. Steps: Create a program that will build a binary search tree (BST) by adding ...

Do you believe corporation pose as a risk to our national

Do you believe corporation pose as a risk to our national economy and to domestic employees based upon external shocks to our economy as well as government regulations and Obamacare?

Question several social networks like facebook or linkedin

Question : Several social networks like Facebook or LinkedIn are able to accurately recommend people you may want to become friends with or connect to. Explain what graph algorithm is relevant for producing this kind of ...

What effect does the teacher have on creating a learning

What effect does the teacher have on creating a learning environment with little to no behavior problems?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As