Add office photos
Employer?
Claim Account for FREE

Clarivate

3.8
based on 604 Reviews
Filter interviews by

Apex Infotech Interview Questions and Answers

Updated 24 Feb 2024

Q1. Best Time to Buy and Sell Stock II Problem Statement

Given the stock prices for a certain number of days, represented as an array, determine the maximum profit you can achieve. You may perform as many transacti...read more

Ans.

The problem involves finding the maximum profit that can be achieved by buying and selling stocks on different days.

  • Iterate through the array of stock prices and find the local minima and maxima to calculate profit

  • Keep track of the total profit by adding the differences between consecutive maxima and minima

  • You can perform multiple transactions, so buy at each local minima and sell at each local maxima

  • Example: For prices = [7, 1, 5, 3, 6, 4], buy at 1, sell at 5, buy at 3, sel...read more

Add your answer
Q2. Can you explain the implementation of abstract classes and interfaces in inheritance, as well as the concepts of function overloading and overriding?
Ans.

Abstract classes and interfaces in inheritance allow for defining common behavior and function signatures, while function overloading and overriding enable polymorphism.

  • Abstract classes are classes that cannot be instantiated and may contain abstract methods that must be implemented by subclasses.

  • Interfaces are similar to abstract classes but can only contain method signatures and constants, with no method implementations.

  • Function overloading refers to having multiple methods...read more

Add your answer

Q3. What is asynchronous function in JavaScript?

Ans.

Asynchronous functions in JavaScript allow code to run without blocking other code from executing.

  • Asynchronous functions use callbacks or promises to handle the result of the function.

  • They are useful for tasks that may take a long time to complete, such as fetching data from a server.

  • Examples include setTimeout(), fetch(), and XMLHttpRequest().

View 2 more answers

Q4. What is polymorphism?

Ans.

Polymorphism is the ability of an object to take on many forms.

  • It allows objects of different classes to be treated as if they were objects of the same class.

  • It is achieved through method overriding and method overloading.

  • Example: A parent class Animal can have child classes like Dog, Cat, and Cow. All of them have a common method called 'makeSound', but each of them makes a different sound.

  • Example: A method can be overloaded by having the same name but different parameters, ...read more

View 5 more answers
Discover Apex Infotech interview dos and don'ts from real experiences

Q5. Reverse alternate words in a given string

Ans.

Reverse alternate words in a given string

  • Split the string into words

  • Reverse alternate words using a loop

  • Join the words back into a string

Add your answer

Q6. Find frequency of letters in a given string

Ans.

Use a hashmap to store the frequency of each letter in the given string.

  • Iterate through the string and update the frequency of each letter in the hashmap.

  • Return the hashmap containing the frequency of each letter.

Add your answer

Q7. Implement bubble sort

Ans.

Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.

  • Start at the beginning of the array and compare the first two elements. If the first element is greater than the second, swap them.

  • Continue comparing adjacent elements and swapping them if necessary until the end of the array is reached.

  • Repeat this process for each element in the array until no more swaps are needed, indic...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Apex Infotech

based on 5 interviews
2 Interview rounds
Coding Test Round
Technical Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Associate Software Engineer Interview Questions from Similar Companies

3.5
 • 53 Interview Questions
3.7
 • 26 Interview Questions
4.7
 • 15 Interview Questions
3.7
 • 13 Interview Questions
3.1
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter