Write a function to remove the duplicates from the linked list.also give main for the function.
Write a function to check whether given singly linked list is palindrome or not. also give main for the function.
Write a function that will take two sorted singly linked List as input and merge them in third list. (You are not allowed to use any sorting algorithm) also give main for the function.
Write a function that will take divide a one singly linked list into two sub lists of almost equal sizes).
Write a function that returns the info of the kth element of the singly linked list. If no such element exists, terminate the program also give main.
Given the following array of 8 integers {2,3,2,1,2,5,8,2} you are required to write a C++ program that will loop through it and re-arrange it into the following final output {5,3,1,8,2,2,2,2} and display it . The idea is to position all values equal to 2 in the array to come after the other values not equal to 2. The order of the other values i.e 5,1,3 and 8 does not matter as long as they appear positioned before all 2s as illustrated in the hint below: Initial array: {2,3,2,1,2,5,8,2} NumbertoMove = 2 Final Array: {5,3,1,8,2,2,2,2} Write an algorithm as a pseudocode to solve the problem above.
You are an employee of a marketing organization that pays you a monthly salary of Ksh.
10,000 if you work for the recommended 160 hours a month (Monday - Friday, 9am - 5pm,
for a month). This salary can however fluctuate based on the number of hours worked, in that
if you work for more than the recommended working hours ie above 160 hours, you earn an
extra 10% of your salary but if you work for less than 160 hours, you will be deducted 10% of
your salary. With the aid of a SWITCH CASE select structure Implement a program written
in C++ that would help the finance department calculate your monthly salary based on the
hours worked being the input value of the program.
LOOPS
If diff is greater than or equal to 50, the program outputs the message indicating that the guess is very high (if guess is greater than num) or very low (if guess is less than num).
If diff is greater than or equal to 30 and less than 50, the program outputs the message indicating that the guess is high (if guess is greater than num) or low (if guess is less than num).
If diff is greater than or equal to 15 and less than 30, the program outputs the message indicating that the guess is moderately high (if guess is greater than num) or moderately low (if guess is less than num).
If diff is greater than 0 and less than 15, the program outputs the message indicating that the guess is somewhat high (if guess is greater than num) or somewhat low (if guess is less than num).
cannon ball thrown straight into air with starting velocity v0. position of cannon ball after t seconds is given by equation s = vi t – (1/2)gt^2. You are required to confirm equation by simulation. In simulation, you consider how ball moves in very short time interval Δt. In short time interval the velocity v is constant, we can compute distance ball moves using Δs = vΔt. You assume Δt is constant with value of 0.01. You get updated position using s = s + v *Δt. In short time interval, Δv = –gΔt, you must keep velocity updated as v = v - g×Δt; In next iteration, new velocity used to update distance. You need to run simulation until cannon falls back to ground. Your program take initial velocity as input. Update position and velocity 100 times per second but print out position only every full second. printout values from exact formula s =vi t – (1/2) gt^2 for comparison.plot the path that cannon ball