Ram
BAN USER
- 0of 0 votes
AnswersWhat is the difference between paging and swapping?
- Ram in United States for QATeam
In windows OS, "My Computer", we see the option of paging, what does that mean?| Report Duplicate | Flag | PURGE
VMWare Inc Quality Assurance Engineer Operating System - 0of 0 votes
AnswersWhen we click on the power button of our Laptop, what happens immediately and how the windows is loaded?
- Ram in India for QATeam| Report Duplicate | Flag | PURGE
VMWare Inc Quality Assurance Engineer Operating System - 0of 0 votes
AnswersTwo arrays are given. Data from both the arrays have to be taken and put into the third array and this third array should have only unique elements. Implement this without using set.
- Ram in India for QATeam| Report Duplicate | Flag | PURGE
VMWare Inc Quality Assurance Engineer Arrays - -1of 1 vote
AnswersWhat is the difference between MVC and Factory pattern?
- Ram in India for QATeam| Report Duplicate | Flag | PURGE
VMWare Inc Quality Assurance Engineer General Questions and Comments - 0of 0 votes
AnswersHow does the print operation work when we try to give a print from a word document?
- Ram in India for QATeam
What is the use of software that comes along with the printer?
How the data is printed after we click on the print button?
What logic is applied for the data to be transferred to the printer?
What is the logic that makes the printer print the data on a sheet of paper?| Report Duplicate | Flag | PURGE
VMWare Inc Quality Assurance Engineer Operating System - 0of 0 votes
AnswersI have to create 5 threads where each thread has to perform the addition operation.
- Ram in India for QATeam
Thread1 - Add 1 to 10
Thread2 - Add 1 to 50
Thread3 - Add 5 to 15
Thread4 - Add 10 to 20
Thread5 - Add 15 to 20
What is the best way to accomplish this?
Also, I need 1 sec time delay between each addition operation.| Report Duplicate | Flag | PURGE
VMWare Inc Quality Assurance Engineer Threads - 0of 0 votes
AnswersThere are two interfaces B and C each having the same method public m1()
- Ram in India for QATeam
class A implements B and C
If class A has to implement method m1, the implemented method would be of which interface?| Report Duplicate | Flag | PURGE
VMWare Inc Quality Assurance Engineer Java - 0of 0 votes
AnswersA method takes two array list as its arguments
- Ram in India for QATeam
Both ArrayList have list of objects similar to the example here below
AL1 = {A,A,B,L,C,F,D,E,F,D,Z,R}
AL2 = {C,E,X,Z,M,X,P,L,M,N,S,T,P,B,A}
The aim is to create a third arraylist AL3 which would contain only elements that are occuring exactly twice, even after combining both AL1 and AL2.
So, the resultant list should be as seen here below
AL3 = {B,C,F,D,Z,E,X,P,M}
What logic do we follow?| Report Duplicate | Flag | PURGE
VMWare Inc Quality Assurance Engineer Java
With a single stack itself this could be done!
Recursion is best.
Enqueue - Usual push operation of a stack
Dequeue - Recursion has to be done, so that the bottom most element is taken from the stack
Listing the elements - Recursion can be done, if you need to list down the elements of queue
If you are in a service based company, I would not estimate your salary to be that low. May be you could aim for 1-2 lakhs more that what you get now.
But, if you are in a product based company, you are definitely taken for a ride!
Please post here if you get a better opportunity! :-) Thanks!
P.S: This is completely based on my knowledge and interpretations only
If my understanding is correct, following is the way to solve this.
- Ram May 21, 2018Taking a simple example of 2 numbers spread over 3 place.
array A = {1,2}; n=3
say the number is: xyz
I see that repetition is allowed, as per the example.
when n=3, we have to take into account n=2 and n=1 based on what I see from the example given in the question.
x can have 1 or 2; y also can have 1 or 2; z also can have 1 or 2.
So the possibilities of all types of 3 digit numbers is: 2*2*2 = 8
Same way, possibilities of all types of 2 digit numbers is 2*2=4
Same way possibilities of all types of 1 digit number is 2
In this case answer would be 14.
Going by this, following snippet would reap the result.
numOfPlaces = 1
while(numOfPlaces<=n) {
result = result + array.length ^ numOfPlaces;
numOfPlaces++;
}
Note: I have not tested the while loop. but conceptually, I believe I have given a fair answer based on the question.
Correct me if wrong.