There is a 100-story building and you are given two eggs. The eggs (and the building) have an interesting property that if you throw the egg from a floor number less than X, it will not break. And it will always brake if the floor number is equal or greater than X. Assuming that you can reuse the eggs which didn't broke; you got to find X in a minimal number of throws. Give an algorithm to find X in minimal number of throws.
5 23265Given an array of characters, how would you reverse it? How would you reverse it without using indexing in the array?
1 9590Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it?
3 8056Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
HCL,
2310what is diff between localstatic and globalstatis variable possible 2 use in another file...?
HCL,
2 5440in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?
IBM,
11 35160Would you rather wait for the results of a quicksort, a linear search, or a bubble sort on a 200000 element array? 1) Quicksort 2) Linear Search 3) Bubble Sort
3 6557
What is struct node in c?
Explain what is a stream?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
What is the symbol indicated the c-preprocessor?
Explain how can I remove the trailing spaces from a string?
What type of function is main ()?
what is the function of pragma directive in c?
write a c program to calculate sum of digits till it reduces to a single digit using recursion
Why structure is used in c?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
What is the use of f in c?
Why is c fast?
How many types of operator or there in c?
What is the use of sizeof () in c?
What is derived datatype in c?