Questions: 11 448

Answers by our Experts: 10 707

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

A palindrome is a string that reads the same forwards as backwards. Using



only a fixed number of stacks and queues, the stack and queue ADT functions, and a fixed



number of int and char variables, write a code to determine if a string is a palindrome. Assume that the string is read from standard input one character at a time. The code should output true or false as appropriate.



Create a class named TIME that has hours, minutes, and seconds, data members, as integers. The class has gettime () to get the specified value in the object, showtime () to display the time object in *hh:mm:ss* format. Write a main () function to create two-time objects. get the value in two objects and display all time objects.

Create a class named Distance that has feets (as int) and inches (as float). The class has Getdist (int, float) to get the specified value in object, Showdist () to display distance object in feets’ inches” format. Write main () function to create two distance objects. Get the value in two objects and display all objects.

Bhaskar found an array A of size n and wants to find a subsequence of the array which is good.

A subsequence is a sequence that can be derived from the given array by deleting zero or more elements without changing the relative order of the remaining elements.


A good subsequence meets following:

The length of the subsequence is even.

let the subsequence be B of size t, where t is even, So let the function f[i] = B[2*i] + B[2*i + 1] for all i from 0 to t2−1 both inclusive. Please note that indexing is zero-based here. So Sotwik wants all the f[i] to be same. In other words f[0] = f[1] = ... = f[t2−1] should hold.


As Bhaskar wants to utilize the whole array and delete as fewer elements as possible. He needs your help in finding the minimum number of elements that are required to be deleted such that the remaining subsequence is a good subsequence.


Input

n is the size of array. Second line has elements of array A of size n.


Output

Print a single integer denoting the minimum number of deletions required.


A race is going to be held soon in college. Each racer will be assigned 3 random points from a set of N distinct points, the ith point is denoted by (Xi,Yi). In order to complete the race, each person has to run on a triangular track, assuming the 3 assigned points to be the corners of the track.

Raghav being the lazy participant wanted to run on the track with the least distance among all the possible tracks. Now, he wants your help to find out what is the smallest distance he has to run in order to finish the race.


Input

The first line contains an integer N(3≤N≤100)

N(3≤N≤100) — the number of points.

This is followed by N lines, each containing two integer Xi and Yi (−10^9≤Xi,Yi≤10^9)

— the coordinates of the ith point.


Output

Print a single real number d where d is the perimeter of the smallest track.


Create a C++ program which shows the given menu items:

1. Create (The create option will create a text file named "mytext.txt"). 

   * This option should save accept basic personal information of the user such as name, course, email and contact number.

2. Read (The read option will read the contents of the file.)

3. Append (The append option will add text contents in mytext.txt)

 * This option should add a string inputted by the user

4. Exit (The exit option will terminate the program which means the program is in loop while running)


1.    Create a class named 'Student' with a string variable 'name' , an integer variable 'roll_no' , 3 float variable called marks 1 , marks 2 , marks 3 and a character variable called grade . Assign the value by creating an object of the class Student.

Then print the ouput like:

 

Name: hamza manzoor

Roll No: s2019266036

Marks 1: 63.5

Marks 2: 55.5

Marks 3: 89.5

Grade: B

Write a program to accept five different numbers by creating a class called friend func1 and  friend func2 taking 2 and 3 arg respectively and calculate the average of these numbers by passing   object of the class to friend function.


Write a C++ program to make a structure of a student consisting of integer age, char name and


structure roll number that further divides into department, session, registration number and


degree. Set and display all the values from main function and display the record on screen to


present the access of structure within structure. You have to by access structure using pointer


type variable of structure.



implement the class Loan with the following requirements:

A member variable that will hold the annual interest rate of the loan. Its default value will be 2.5.

A member variable that will hold the number of years for the loan. Its default value will be 1.

A member variable that will hold the loan amount. Its default variable will be 1000.

A default constructor.

Another constructor that has interest rate, years, and loan amount as its parameters.

A member function that returns the annual interest rate of this loan.

A member function that returns the number of the years of this loan.

A member function that returns the amount of this loan.

A member function that sets a new annual interest rate to this loan.

A member function that sets a new number of years to this loan.

A member function that sets a new amount to this loan.

A member function that returns the monthly payment of this loan.

A member function that returns the total payment of this loan.


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS