Академический Документы
Профессиональный Документы
Культура Документы
**1. Give a string, print total count of substrings (length>=2) which are palind
romes. He was expecting better than O(n2) time complexity.
Description:
The function atof() converts str into a double, then returns that value. str mus
t start with a valid number, but can be terminated with any non-numerical charac
ter, other than "E" or "e".
Example:
x = atof( "42.0is_the_answer" );
RESULT: x set to 42.0
4) Given two arrays of numbers, find if each of the two arrays have the same set
of integers? Suggest an algo which can run faster than NlogN?
5) Given 2 set of arrays of size N(sorted +ve integers) find the median of the r
esultent array of size 2N (something better than storing the two arrays in one a
nd then sorting them).
5.5).Given a string 'abcdef' and another string 'efg' remove all occurences of
the characters in 'efg' from 'abcdef'. Write 'to ship' code and give test
cases. Design a program to test any implementation of this problem
6:Reverse a linked list.
12)10. Given a sorting order string, sort the input string based on the given so
rting order string.
Ex. sorting order string -> dfbcae
Input string -> abcdeeabc
output -> dbbccaaee
13). Convert an ASCII representation of a positive integer to it's numeric value
.
14)Given an array of strings, print them vertically.
E.g. cat, an, cool ?
c a c
a n o
t o
l