gadha
BAN USER- 3of 3 votes
AnswersA program stores total order numbers arrived at different time. For example, at 1.15 pm the program got 15 order, at 1.30 pm, the program got 20 order and so on.Now we need to design the data structure so that we can query the total orders we got in a time range efficiently. For this example, we can query as How many orders we have got between 1 and 2 pm? Ans will be 15+ 20 = 35
- gadha in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Data Structures Java Object Oriented Design - 0of 0 votes
AnswersI have an arrayList A which contains say 2,3,5,7,8
- gadha in India
I have another arrayList B which contains 1, 3
Now taking the elements of B as the locations, I need to remove the elements of A present in that locations. So, basically I need to remove the element 2(position 1) and 5(position 3) from A. How to achieve it as we know that once one element got removed from an arrayList,the positions will be auto adjusted.| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Java
Repdeborahdond, Rehabilitation counsellor at Parts salesperson
Hello, I am Deborah Rehabilitation counsellors who help people with physical, mental, developmental, or emotional disabilities live independently. I want ...
Synchronized keyword in a method make it sure that the particular method is accessed by one and only one thread at a time. This is possible because in order to access a synchronized method, a thread need to acquire the lock associated with the method. In case of synchronized method, the lock is the same object on which the method is invoked. Now, as one lock can be acquired by only one thread at a time, the synchronized methods can be accessed by only one thread at a time.
- gadha November 30, 2015