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

  To analyse and comprehend a provided er diagram

Display the item id and the difference between the default price and cost (ITECH5006 - together with a percentage markup) of all products.

  Design a database for an insurance company

Consider a video game store. For each game, the database contains information about title, producing company name, designer(s) name(s), version of the game, type of the game and characters in the game.

  Create the primary key and foreign keys using a uml class

In order to move forward, the local university will need to develop a data model that will retain student records and perform various data extract transform and load (ETL) processes.

  Design an relational model model of a database

Design an Relational Model (RM) model of a database (DB) that will be useful for each of the chosen enterprises. (Hint: You may choose to translate the 2 ER model designs you created ).

  Write an application that creates a database named phonebook

Write an application that creates a database named PhoneBook. The database should have a table named Entries, with columns for a person's name and phone number. Next, write an application that lets the user add rows to the Entries table,

  Create an actual web page document

Modify the XML document in Exercise 2 to include a namespace URL from which the elements of the XML document in Exercise 3 will be associated with. Make any changes to the XML document that are necessary as a result of the namespace URL inclusion.

  Produce different final database state than using trigger

Assume that relation Employee has no tuples in it initially. You are to show the simplest example you can think of where using trigger T1 will produce a different final database state than using trigger T2.

  What is the two-phase locking protocol

What is the two-phase locking protocol and what is the strict two-phase locking protocol? What is the rigorous two-phase locking protocol? What benefit does strict two-phase locking protocol provide? What benefit does rigorous two-phase locking pr..

  Explain the datawarehouse and data mining concepts

There are six major types of information systems which organisations use in their operations. Discuss how these information systems support managers in their decision making role Explain the datawarehouse and data mining concepts using appropria..

  Create a decision table that describes movement of inventory

Name four attributes that you can use to define a data flow in the grocery inventory information system.

  What is the highest normal form r is in

What functional dependencies can you conclude from the data above and what is the highest normal form R is in?

  Convert this eer diagram to relational database schemas

Show an alternative design using the General notations for the attribute described in Problem 2 that uses only entity types (including weak entity types if needed) and relationship types.

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