ION Trading Java Interview Questions

Upasana | August 21, 2019 | 3 min read | 1,160 views | investment banking


Design Questions

  1. Design high throughput trading application? Application is hosted in NY and we have traders all over the world accessing this application. What things we need to take care on designing this application. Hint- High concurrency using Atomic package rather than synchronization, Timezone and Localization, Currency Conversion, Connection Pooling, No GC pauses (proper memory management), Horizontal scalability using restful architecture, ActiveMQ for asynchronous communication, etc.

Algorithms and Data Structures

  1. If we have unsorted list of numbers like 3,1,4,7,9,4,7,4,9 best way to figure out if number n exists in the list? they were interested in constant time performance?
    Hint - Consider preprocessing the data using a hashtable and then query the table in O(1) complexity

  2. Removing duplicates from unsorted list of integer maintaining the order of input in results? if you have unsorted list of 0,5,9,5,6,7,6,9 the result should be 0,5,9,6,7 and the performance should be best over more number of elements. Hint - Store the list in LinkedHasSet and printing it will get expected output, Other way could be use of hashtable to store the numbers and then printing it, Counting Array can also be used to achieve the same if the input range is known and limited.

  3. Describe the design of a low latency distributed environment where multiple processes( or threads) need to access shared data structure or a database for a fast (speaking of a fraction of a millisecond) read or update. You have to process tons of request very quickly ( you can think of market price data as an example, etc). How would you build such an environment in the most efficient way? Describe the solution in details(a few sentences). Hint- use of non-blocking algorithms and CAS (compare and Set/Swap) feature provided by java. This way we will get rid of the low throughput offered by synchronization used in thread safe programs. refer to Concurrency in practice for more details.

  4. Write a program to print elements of a linked list in reverse order by using same single linked list in java.
    Hint - Start traversing the singly linked list and put the nodes in a stack till you reach the end of the list. Then pop from the stack. The elements will be in the reverse order to the original linked list.

  5. Design a thread-safe ObjectPool (Generic type i.e. ConnectionPool, ThreadPool, etc) in Java. Interface should look like:

    interface Pool {
      Connection get();
      void put(Connection con);
    }

    Hint- Designing a thread-safe connectionPool in java

  6. Describe the Producer Consumer problem using Java language? How will you make it thread-safe?

  7. Given a huge file, design a data structure to output all possible anagrams of a particular word. For Eg the file contains: "POT, OPT, TOP". If I query for POT, I should get back all possible anagrams contained in the file.

  8. Write a Java program to reverse the sequence of words in a sentence. for example "This is my world" should become "world my is this"

    Hint - With limited Space -

    This can be done without any additional space in 2 pass

    • reverse the string in place

    • reverse each word of the reversed string.

      With Time : O(N) and Space : O(N) Split the words and then traverse the array in reverse direction.

  9. Print n elements of a fibonacci series.

  10. Find whether there is a loop in a given linked list or not?

    Hint - It can be done using one pointer but not without extra space. You can store the addresses of all the nodes visited in a hashmap. And for every next node, check its presence in hashmap.


Buy my ebook for complete question bank

Most of these questions has been answered in my eBook "Cracking the Core Java Interview" updated on June 2018, that you can buy from this link:

Buy from Shunya (DRM Free PDF download with updates)

investment banking:
  1. Finastra Investment Banking Interview Questions
  2. Markit Java Interview Questions
  3. Goldman Sachs Java Interview Questions
  4. Java topics covered in Investment Banking Interviews (Morgan Stanley, Barclays, RBS, UBS, BlackRock)
  5. Morgan Stanley Java Interview Questions
  6. UBS Java Interview Questions
  7. Citibank Java developer interview questions
See all articles in investment banking
Top articles in this category:
  1. Sapient Global Market Java Interview Questions and Coding Exercise
  2. Multi-threading Java Interview Questions for Investment Bank
  3. Morgan Stanley Java Interview Questions
  4. Citibank Java developer interview questions
  5. UBS Java Interview Questions
  6. Goldman Sachs Java Interview Questions
  7. Cracking core java interviews - question bank

Recommended books for interview preparation:

Find more on this topic: