Anagram Checking: Design an algorithm for checking whether two given words are anagram, i.e.
whether one word can be obtained by permuting the letters of the other. For example, the
words eat and tea are anagrams.
2. Given two linked lists sorted in increasing order. Write an algorithm which will merge them
such a way that the result list is in decreasing order (reverse order).
Input: List 1: 5->10->15->20
List 2: 2->7->25
Input: List 1: NULL
List 2: 2->5->7
3. Given two dates, write an algorithm to find total number of days between them.
Input: date1 = 10th February 2014
Date2 = 10th March 2015
4. A magic number is defined as a number which can be expressed as a power of 5 or sum of unique
powers of 5. First few magic numbers are 5, 25, 30(5 + 25), 125, 130(125 + 5), ….
Write an algorithm to find the n’th Magic number.
Input: n =2
Input: n =5
5. Lucky numbers are subset of integers. For example, consider the following set of consecutive
Now, first, delete every second number, we get following reduced set.
Now, delete every third number, we get
1, 3, 7, 9, 13, 15, 19,….….
Continue this process indefinitely……
Any number that does NOT get deleted due to above process is called “lucky”.
Therefore, set of lucky numbers is 1, 3, 7, 13,………
Now, given an integer ‘n’, write an algorithm to find whether this number is lucky or not.
14 freelancers are bidding on average $114 for this job
All this algorithms are classical and easy to understatnding, but what kind of result do You need? - pseudocod (text description of algorithms)? or text of program for one of existing languages?
I can help with your problem since I have a Master in numerical analysis and a teaching-assistant in 2 courses related to finite element method. I have also a large experience in C,C++ and matlab programming.
Hi, client. I am a C++/Objective-C programmer and mathematician. I already have all answers about your five problems. Only remains programming and it is easy. Please check my profile and hire me. Thanks.