Write a function checksmaller

Assignment Help Database Management System
Reference no: EM13333152

1) Write a function 'CheckSmaller' that takes two linked list as input arguments. These linked list contain numbers like this:

num1->3->5->2->NULL (this linked list represents a decimal number 352)
num2->4->3->9->1->NULL (it represents a decimal number 4391)

The function CheckSmaller should return 1 if num1 points to a linked list which represents a smaller number than the number pointed to by num2 linked list. Otherwise, it returns -1. If both linked list point to exactly the same number, CheckSmaller returns a 0.

int CheckSmaller(Node* num1, Node* num2);

For example, if two linked lists are:

num1->8->4->2->NULL (assuming that number 1 is 842) and
num2->8->4->3->NULL (assuming that number 2 is 843)
then your function should return 1 since 842 is smaller than 843.

2) Write a function 'Max' that takes an int array and the size of the array as input and returns the largest element of the array. The function should look like the following:
int Max(int a[], int size);

 

Reference no: EM13333152

Questions Cloud

Explain the infrared region of electromagnetic radiation : An astrophysicist working at an observatory is interested in finding clouds of hydrogen in the galaxy. Usually hydrogen is detected by looking for the Balmer series of spectral lines in the visible spectrum. Unfortunately, the instrument that dete..
What will be the change in the bonds price in dollars : The firm recently became more financially stable and the rating agency is upgrading the bonds to BBB. The new appropriate discount rate will be 7.1%. What will be the change in the bond's price in dollars
Compute net paid holidays worked for a full-time employee : the metropolis health system managers are also working on their budgets for next year. each manager must annualize his or her staffing plan, and thus must convert staff net paid days worked to a factor.
State heated at constant volume until its pressure increases : A) (25 pts) Consider a 1.00 mol sample of acetylene (C2H2) is allowed to undergo the following two step, reversible process: the gas is a) first heated at constant volume until its pressure increases from 2.5 atm to 3.2 atm
Write a function checksmaller : Write a function 'Max' that takes an int array and the size of the array as input and returns the largest element of the array. The function should look like the following.
What strategies can implement to create a positive outcome : The Fed is scheduled to meet in one week to assess economic conditions and set monetary policy. Economic growth has been high, but inflation has also increased from 3 percent to 5 percent (annualized) over the last four months.
What will the value of the coefficient restitution have : suppose we place a small explosive charge on one of the bumpers so that it would explode on contact, pushing the 2 cars apart. What will the value of the coefficient restitution have
Define what is the wavelength of the radiation : A microwave oven operates at 3.00GHz . What is the wavelength of the radiation produced by this appliance? Express the wavelength numerically in nanometers.
Prepare the journal entry to record each of the transaction : Prepare the journal entry to record each of the following independent transactions. (Use the number of the transaction in lieu of a date for identification purposes.) 1. Services provided on account of $1,530

Reviews

Write a Review

Database Management System Questions & Answers

  Types of keys used in relational database

Explain with examples different types of keys used in relational database, how they help relating different tables.

  Relations of airline flight information

The relations given below keep track of airline flight information:Flights(flno: integer, from: string, to: string, distance:integer, departs: time, arrives: time, price: real)Aircraft(aid: integer, aflame: string, cruisingrange: integer)

  Create a struct data structure for each file contained

Write a password protected console-based application, which enables you to create user accounts and specify the name of the file or directory to be shared with other users.

  Construct a relational schema for the er-diagram

Construct a relational schema for the ER-diagram. Make sure that you correctly translate Specialization and Many-to-Many relationships. Please follow carefully the following guidelines when you ?nish this question.

  Draw inheritance hierarchy to represent shoe object

Draw an inheritance hierarchy to represent a shoe object. The base class should have derived classes of Dress Shoes, Tennis Shoes and Boots.

  Discuss the serious data redundancy problems

Identify and discuss the serious data redundancy problems exhibited by the file structure shown in Figure and looking at the EMP_NAME and EMP_PHONE contents in Figure, what change(s) would you recommend?

  Create a table for patients with information

Create a table (by your own imagination) which comprises the least 25 patients with next information (columns): Calculate average of Value1 for each Gender.

  Write name of employee on every project located in houston

Write the name(s) of employee(s) who works(work) on every project located in Houston. Write the name(s) of employee(s) who only works(work) on every project located in 'Houston.'

  Physical schema created for a database

At this point in the design process, you would have a detailed physical schema created for a database. How would you approach converting your schema into a database, complete with sample data? Explain your approach in two to three paragraphs.

  Research paper on the turing and von neumann models

Write a two page research paper on the Turing and von Neumann models.

  Find all non-trivial dependencies

Compute the closure sets of R, find all non-trivial dependencies and what are the candidate keys of R?

  Create an update query to select all records in the tbl over

Create an update query to select all records in the tblOverPriced, decrease the Price field values by 10%, run and close the query.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd