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

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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