IBM Interview Questions
- 0of 0 votes
Answersadvantages and need of data mining?
- khushboo taneja July 15, 2011| Report Duplicate | Flag | PURGE
IBM Developer Program Engineer Data Mining - 0of 0 votes
AnswersWhat is the size of a class which will have only one function declaration as public. And what is the size of a class if that the same function is declared as virtual.
- viswathsen April 10, 2011class Myclass { public: int fun(); }; Sizeof(Myclass) ?? And class Myclass { public: vitual int fun(); }; Sizeof(Myclass) ??
| Report Duplicate | Flag | PURGE
IBM Developer Program Engineer C++ - 0of 0 votes
AnswersGiven a random function that generates a random number between 1 and 5 inclusive, write a function to generate a random number between 1 and 7 inclusive.
- Alzaadi shau neum December 24, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 1of 1 vote
AnswersGiven a matrix of integers where every row is sorted and every column is sorted. Print all elements in sorted order.
- Anonymous August 27, 2010
Cannot use merging of arrays. Solution should be better than O(n2logn)| Report Duplicate | Flag | PURGE
IBM System Administrator Operating System - 0of 0 votes
AnswersGiven a set of positive and negative integers, partition it into two subsets S1 and S2 such that sum (S1) - sum (S2) = minimum (0 if possible)
- Anonymous August 27, 2010
A little discussion revealed the problem is NP. But he wanted a solution O(kn) where k is max element in the array| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersYou are given an array of positive integers. Convert it to a sorted array with minimum cost. Only valid operation are
- Anonymous August 26, 2010
1) Decrement -> cost = 1
2) Delete an element completely from the array -> cost = value of element
For example:
4,3,5,6, -> cost 1
10,3,11,12 -> cost 3| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersWhat happens if TCP consistently gets timeouts for a given packet? What does it do to maintain reliability?
- Anonymous August 26, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersLets say you are using UDP to show a live video. Which feature of TCP will you miss the most?
- Anonymous August 26, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersCan you have duplicate packets in UDP?
- Anonymous August 26, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswerHow will you enhance UDP to have the TCP level of reliability. Basically no packets are lost, duplicate packets are discarded.
- Anonymous August 26, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersHow will you implement a monitor in C++?
- Anonymous August 26, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersYou have a huge graph of cities and cost of flight between them. Find the cheapest path from A to B. The graph doesnt fit in memory
- Anonymous August 25, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersGiven a line segment of length n. You need to cut it into m pieces specified by position[n] array. The price of cutting a segment of length len in two parts is always len (irrespective of cut position). Give a dynamic programming solution to minimize the cost of cutting
- Anonymous August 24, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersGiven a dictionary of words and a string with all spaces removed, return whether the string is composed of valid words
- Anonymous August 24, 2010
e.g
helloworld-> hello world (valid)
isitniceinhere-> is it nice in here (valid)
zxyy-> invalid
Using dynamic programming I got an O(n3) algorithm but he insisted on an O(n2), any idea?| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer Data Mining - 0of 0 votes
AnswersA palindrome number is of the format 1234321.
- Anonymous August 23, 2010
Given a number x, find the smallest palindrome greater than x| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswerDesign object-pool
- Anonymous August 19, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswerWhat classes and data structures would you use for a file system?
- Anonymous August 19, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersGive a string, print total count of substrings (length>=2) which are palindromes. He was expecting better than O(n2) time complexity
- Anonymous August 18, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersIBM sells laptops from its website. The total cost is base price + shipping (depends on customer location). How will you design this?
- Anonymous August 17, 2010
Now imagine millions of transactions. Will you have a separate class per transaction or a single class for all transactions or something else?| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersYou have a binary tree of some shape. Convert it to BST search tree of same shape.
- Anonymous August 17, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswerYou have a graph with and start point A and end point B. All edges have positive weights. Now the shortest path from A to B can be found using Djikstra.
- Anonymous August 17, 2010
1) Find the kth shortest path
2) Find the longest path| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersA huge file contains unsorted integers. Find the median. The file cannot be loaded in memory
- Anonymous August 07, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersProve that you can't build a random number generator function that will output numbers 1 to 7 with uniform distribution and guaranteed to work in finite time using a random number generator that outputs either 1 or 2 with equal probability
- Anonymous August 06, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
AnswersGiven a array, find k increasing numbers whose summation will be maximum.
- Anonymous July 25, 2010
Array: 1,5,2,8,7,6,11
k=3
Answer: 5,8,11=24| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer - 0of 0 votes
Answershow to convert a queue into stack
- aaaa June 25, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer Stacks - 0of 0 votes
AnswersInterview for mid-level java developer:
- biggied88 March 04, 2010
problem-solving skills question:
You have a page with a main menu and then submenus. depending on which menu button you press different set of submenus is shown. when the user presses on a submenu button they are sent to that page by a link. You want to setup a breadcrumb in the URL to show where the user has been - pressing the main menu, then the submenu the link for the submenu should display in the URL(example. page1/page2/?link=_...).
Issue: link keeps changing -
The user clicks the menu, the submenu is shown, then they click on a submenu, then they go back to the main menu, then click on the same submenu as before a different link is seen. but it should be the same link since it is the same menu to submenu combination.
how do you solve this issue?
** this was a "feel-out" question. I later found this out it wasn't meant to be a question i was suppose to be able to answer correctly but a question to test an individual's problem solving when on a diffuclt problem| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer Ideas - 0of 0 votes
AnswersExplain the different types of EJBs
- biggied88 March 04, 2010| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer Java