Questions: 1 680

Answers by our Experts: 1 680

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

Write a c code for travelling salesman problem using brute force.

Take ‘n’ historic sites in Tamil Nadu as input. Design and implement a code in c language using brute force approach that identifies the shortest possible route for a traveller to visit these sites and come back to his starting point.


write a program for Strassen’s matrix multiplication algorithm using divide and conquer approach in c language.


Rahul lives in City A and would like to travel to City B for work. There is a shuttle service for people in these cities which has a fixed schedule. The schedule for City A is a list of boarding times(at City A) and departure times(from City A) for each bus.

Note: No one is allowed to board a shuttle after the boarding time.

He arrives at time t and sometimes has to wait at the station. You are given a list of arrival times for n days.

  1. Devise an algorithm to find him the shuttle with the least waiting time. (waiting time = boardingj - t , where j is the next shuttle. And boardingj >= t ) for each ti
  2. If he also has access to the travel time of each shuttle. Can you help him find the shuttle which will help him reach his destination at the earliest ?

Return an array of shuttle indexes that Rahul took for n days.



given a number of mangoes and number of persons. Find the number of ways to distribute identical mangoes among identical persons


a company is planning a big sale at which they will give their customers a special promotional discount. each customer that purchases a product from the company has a unique customer id numbered from 0 to n-1.

1.andy, the marketing head of the company, has selected bill amounts of the n customers for the promotional scheme. the discount will be given to the customers whose bill amounts are perfect squares. the customers may use this discount on a future purchase. write an algorithm to help andy find the number of customers that will be given discounts?

Given an array of integers, update every element with the product of previous and next elements with following exceptions. i.       First element is replaced by multiplication of first and second.ii.      Last element is replaced by multiplication of last and second last.

All the students in a class are involved in any one of the Sports, be it indoor or outdoor. The details of their Names, Roll_no, Sport are recorded as a list. Write pseudocodes to return the following.

a.    Given a Roll_no, return the Sport(s) he/ she has registered.

b. Given a Sport, find the list of students who have enrolled for the same



Write a program to create a class to store details of a student ( name, roll and 3 subject marks ). Input details for 2 students and assign all the details of that student who is having higher average mark to a new student using  friend function.



Traverse a singly linked list from the beginning to the end and reverse all the increasing and decreasing sequence of components present in the list. Component is the collection of continuous elements either in increasing or decreasing order. Example: Let the list contains 1, 2, 3, 7, 4, 2, 9, 7, 8 elements. Here the components are “1, 2, 3, 7”, “4, 2”, “9, 7”, and “8”. The code should produce the list with elements 7, 3, 2, 1, 2, 4, 7, 9, 8.



LATEST TUTORIALS
APPROVED BY CLIENTS