FICO
The Wisdom Tree School Interview Questions and Answers
Q1. Which programming language do you prefer, Java or C++?
I prefer Java for its portability and ease of use, while C++ offers more control and performance for system-level programming.
Java is platform-independent due to the JVM, making it easier to run on different systems.
C++ provides low-level memory manipulation, which is beneficial for performance-critical applications.
Java has a rich standard library and built-in garbage collection, simplifying development.
C++ allows for operator overloading and multiple inheritance, offering m...read more
Q2. What information do you have regarding pipelines?
Pipelines are automated processes that streamline software development, testing, and deployment.
Continuous Integration (CI): Automates code integration and testing, e.g., Jenkins, Travis CI.
Continuous Deployment (CD): Automates deployment to production, e.g., GitLab CI/CD.
Data Pipelines: Manage data flow between systems, e.g., Apache Kafka, Apache Airflow.
Build Pipelines: Automate building software from source code, e.g., CircleCI, Azure DevOps.
Q3. Sort array containing 0s, 1s and 2s
Sort an array of 0s, 1s, and 2s in linear time complexity.
Use three pointers to keep track of the positions of 0s, 1s, and 2s.
Traverse the array and swap elements to their respective positions.
Time complexity: O(n), Space complexity: O(1).
Q4. Why is string immutable in java?
String is immutable in Java to ensure security, thread safety, and optimization.
Immutable strings are thread-safe as they cannot be modified concurrently by multiple threads.
String pooling allows Java to optimize memory usage by reusing common string literals.
Immutable strings prevent security vulnerabilities like SQL injection attacks.
Q5. Abstract class vs interface
Abstract class is a class that cannot be instantiated, while an interface is a contract that a class must implement.
Abstract classes can have implemented methods, while interfaces cannot
A class can implement multiple interfaces, but can only inherit from one abstract class
Interfaces are used for achieving multiple inheritance in Java
Abstract classes are used for creating a base class for other classes to inherit from
Example of abstract class: public abstract class Animal { pu...read more
Q6. Spiral order traversal of BST.
Spiral order traversal of BST
Use two stacks to traverse the tree in a spiral order
Push the root node into the first stack
While the first stack is not empty, pop a node and print its value
Push its left and right children into the second stack
Once the first stack is empty, swap the stacks and repeat the process
Continue until both stacks are empty
Q7. Hashmap vs hashset
Hashmap is a key-value pair data structure while Hashset is a set of unique values.
Hashmap allows duplicate values but not duplicate keys.
Hashset does not allow duplicate values.
Hashmap is implemented using a combination of hash table and linked list.
Hashset is implemented using only a hash table.
Example of Hashmap: {1:'one', 2:'two', 3:'three'}
Example of Hashset: {'apple', 'banana', 'orange'}
Q8. Arraylist vs hashmap
ArrayList is a resizable array while HashMap is a key-value pair data structure.
ArrayList is ordered and allows duplicates while HashMap is unordered and does not allow duplicate keys.
ArrayList is accessed by index while HashMap is accessed by key.
ArrayList is suitable for storing and accessing elements sequentially while HashMap is suitable for fast lookup of values by key.
Example: ArrayList - List<String> names = new ArrayList<>(); names.add("John"); names.add("Jane");
Examp...read more
Interview Process at The Wisdom Tree School
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month