Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

  1. Sort the data stored in 1) stack 2) queue and 3) linked list
  2. Take user input and insert the data at the respective position in the sorted 1) stack 2) queue and 3) linked list.

Write a C++ Program to make a age calculator to calculate the age of two persons that will ask first person to enter date of birth and second to enter age,the date kf birth will be in format of dd/mm/yy when it will enter the age like my dob is 8/8/2002 I'm 18 it has to show you're 18 and elder than second person..it also has to show that who is elder who is younger for example first person is 18 and second is 17 it has to show first person is elder second is younger also tell the age difference in dd/mm/yy format for example first person is 18 years 9 months 7 days elder second is 17 years 4 months 15 days younger also tell how many years it is younger one year two year e.t.c





Area of Rectangle

Given an MxN matrix filled with

X's and O's, find the largest rectangle containing only X's and return its area. If there are no Xs in the entire matrix print 0.
Input

The first line of input will be containing two space-separated integers, denoting M and N.

The next M lines will contain N space-separated integers, denoting the elements of the matrix.

Output

The output should be a single line containing the area of the maximum rectangle.

Explanation

For example, if the given M, N and elements of matrix are as the following


4 5

X O X O O

X O X X X

X X X X X

X O O X O


The matrix from indices (1, 2) to (2, 4) has the maximum rectangle with

X. So the output should be the area of the maximum rectangle with X, which is 6.


Sample Input 1

4 5

X O X O O

X O X X X

X X X X X

X O O X O


Sample Output 1

6


Sample Input 2

3 3

O X X

O X X

O O O


Sample Output 2

4




Create a program to help a generous person who wants to distribute money among needy people. He wants to serve those persons first whose bank balance is least but if there are two persons with same balance then he wants to check the number of dependents of both persons. Use the best-suited data structure to form a fair money distribution system.


Smaller Scores

A group of people(

P) are playing an online game. Their scores are stored in order of their entry time in S. Each integer S[i] corresponds to score of person Pi.For each person

Pi you have to report the number of people who played after person and scored less than the person.
Input

The first line contains a single integer

N. The second line contains N space-separated integers representing score S[i] of person Pi.
Output

Output should contain

N space-separated integers representing the number of people who played after person and scored less than the person.
Explanation

Given

S = 13 12 11Score of

P1 is 13. Score of P2 is 12. Score of P3 is 11.The number of people who played after

P1 and scored less than 13 is 2(12, 11). The number of people who played after P2 and scored less than 12 is 1(11). The number of people who played after P3 and scored less than 11 is 0.The output is

2 1 0.


Sample Input 1

3

13 12 11


Sample Output 1

2 1 0


Sample Input 2

4

4 3 5 2


Sample Output 2

2 1 1 0




# Write a function good_string that consumes a string, produces True if the first character is a 

# letter and the second character is either a digit or a blank space and produces False 

# otherwise



Lucky Pairs

Two numbers are said to be lucky pairs . if first number is divided by second number and second number is divided by first number. given an integer N . find all possible combinations of lucky pairs.



input:

2


output:

2


Explanation:

input is 2

possible combinations are [1,2],[2,1].here in [1,2]1 is divisible by 2, and in [2,1] 2 is divisible by 1 .so the number of lucky pairs are 2.



The program accepts two inputs, namely: a train station number indicating where the passenger will board the train, a second train station number indicating where the passenger will get off from the train. Train stations are numbered consecutively from 1 to 100. The train fare is computed based on the number of stations that the passenger will pass through. Included in the counting are the stations where he/she boarded and the station where he/she got off. For example, if the passenger boarded at station 51 and got off at station 85, then the passengers passed through a total of 35 stations. A fixed fare of 30.00 Pesos should be paid by the passenger for the first 20 stations. An additional 1.25 Pesos is charged for every additional station. The program should output the the count or number of stations passed through by the passenger and the train fare.


Write a function to calculate the rate of inflation for the past year. The function receives the current price of some item and its associated price one year ago as inputs. The item could be a kilogram of sugar or flour, for example. It then estimates the inflation rate as the difference in price divided by the year-ago price. The estimated inflation rate should be returned as a value of type double giving the rate in percent, for example, 5.3, if the inflation was estimated to be 5.3 percent. 


C. As the lead system engineer at AIT, you have been given raw data for hundred (100) students who sat for an entrance exam and you have been asked to write the pseudocode to summarize the results. For each student grade, it is written a “P” for pass and “F” for fail. 7 Use indentation and line numbers to highlight the flow of the program: Your pseudocode should address the following: i. Prompt the user to enter each result one after the other ii. Provide a count of the results of each type iii. Summarize the results indicating the number that passed or failed [5 marks] END OF PAPER


LATEST TUTORIALS
APPROVED BY CLIENTS