Add office photos
Newgen Software Technologies logo
Employer?
Claim Account for FREE

Newgen Software Technologies

3.7
based on 1.4k Reviews
Video summary
Filter interviews by
Software Developer
Skills
Clear (1)

10+ Newgen Software Technologies Software Developer Interview Questions and Answers

Updated 20 Jun 2024

Q1. N-th Fibonacci Number Problem Statement

Given an integer ‘N’, your task is to find and return the N’th Fibonacci number using matrix exponentiation.

Since the answer can be very large, return the answer modulo ...read more

Ans.

The task is to find the Nth Fibonacci number using matrix exponentiation.

  • Use matrix exponentiation to efficiently calculate the Nth Fibonacci number

  • Return the answer modulo 10^9 + 7 to handle large numbers

  • Implement the function to solve the problem

  • The Fibonacci sequence starts with 1, 1, so F(1) = F(2) = 1

  • The time complexity can be improved to better than O(N) using matrix exponentiation

Add your answer
right arrow

Q2. Relative Sorting Problem Statement

You are given two arrays, 'ARR' of size 'N' and 'BRR' of size 'M'. Your task is to sort the elements of 'ARR' such that their relative order matches that in 'BRR'. Any element...read more

Ans.

The task is to sort the elements of ARR in such a way that the relative order among the elements will be the same as those are in BRR. For the elements not present in BRR, append them in the last in sorted order.

  • Create a frequency map of elements in ARR

  • Iterate through BRR and for each element, append it to the result array the number of times it appears in ARR

  • Iterate through the frequency map and for each element not present in BRR, append it to the result array

  • Sort the resul...read more

Add your answer
right arrow

Q3. Remove Duplicates from Sorted Array Problem Statement

You are given a sorted integer array ARR of size N. Your task is to remove the duplicates in such a way that each element appears only once. The output shou...read more

Ans.

The task is to remove duplicates from a sorted integer array in-place and return the length of the modified array.

  • Use two pointers, one for iterating through the array and another for keeping track of the unique elements.

  • Compare the current element with the next element. If they are the same, move the second pointer forward.

  • If they are different, update the first pointer and replace the element at the first pointer with the unique element.

  • Continue this process until the end o...read more

Add your answer
right arrow

Q4. Binary Palindrome Check

Given an integer N, determine whether its binary representation is a palindrome.

Input:

The first line contains an integer 'T' representing the number of test cases. 
The next 'T' lines e...read more
Ans.

Check if the binary representation of a given integer is a palindrome.

  • Convert the integer to binary representation.

  • Check if the binary representation is a palindrome by comparing it with its reverse.

  • Return true if it is a palindrome, false otherwise.

Add your answer
right arrow
Discover Newgen Software Technologies interview dos and don'ts from real experiences

Q5. Reverse String Word Wise

You are tasked with reversing the given string word-wise. This means that the last word in the input string should appear first, the second-last word second, and so on. Importantly, eac...read more

Ans.

Reverse the given string word-wise while keeping the characters of each word in their original order.

  • Split the input string by spaces to get individual words

  • Reverse the order of the words in the resulting array

  • Join the words back together with spaces in between

Add your answer
right arrow

Q6. Maximum Subarray Sum Problem Statement

Given an array arr of length N consisting of integers, find the sum of the subarray (including empty subarray) with the maximum sum among all subarrays.

Explanation:

A sub...read more

Ans.

Find the sum of the subarray with the maximum sum among all subarrays in a given array.

  • Iterate through the array and keep track of the current sum and maximum sum seen so far.

  • If the current sum becomes negative, reset it to 0 as it won't contribute to the maximum sum.

  • Return the maximum sum as the result.

  • Example: For input arr = [-2, 1, -3, 4, -1], the maximum subarray sum is 4.

Add your answer
right arrow
Are these interview questions helpful?

Q7. Add Two Numbers as Linked Lists

You are given two singly linked lists, where each list represents a positive number without any leading zeros.

Your task is to add these two numbers and return the sum as a linke...read more

Ans.

Add two numbers represented as linked lists and return the sum as a linked list.

  • Traverse both linked lists simultaneously while keeping track of carry

  • Create a new linked list to store the sum

  • Handle cases where one list is longer than the other

  • Consider edge cases like carry at the end of addition

Add your answer
right arrow

Q8. 1. What is triggers 2. Difference between method overloading and method overriding 3. Ask me to code five numbers in ascending order 4.ask me to code prime or not 5. Difference between final and finally keyword...

read more
Ans.

Interview questions for Software Developer on triggers, method overloading/overriding, sorting, prime numbers, final/finally keyword, and normalization.

  • Triggers are database objects that are automatically executed in response to certain events.

  • Method overloading is having multiple methods with the same name but different parameters, while method overriding is having a subclass method with the same name and parameters as a superclass method.

  • Sorting five numbers in ascending or...read more

Add your answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q9. Why do we use Static in java

Ans.

Static keyword in Java is used to create class-level variables and methods.

  • Static variables are shared among all instances of a class

  • Static methods can be called without creating an instance of the class

  • Static blocks are used to initialize static variables

  • Static import is used to import static members of a class

View 1 answer
right arrow

Q10. What is Singleton Class?

Ans.

A Singleton Class is a class that can only have one instance and provides a global point of access to it.

  • Singleton Class restricts the instantiation of a class to a single object.

  • It is used when only one instance of a class is required throughout the system.

  • It provides a global point of access to the instance.

  • It is implemented by making the constructor private and providing a static method to access the instance.

  • Examples include Logger, Configuration Manager, and Database Con...read more

Add your answer
right arrow

Q11. Write Program with Singleton class

Ans.

Singleton class ensures only one instance of a class is created and provides a global point of access to it.

  • Create a private constructor to prevent direct instantiation of the class

  • Create a private static instance of the class

  • Create a public static method to get the instance of the class

  • Ensure thread safety by using synchronized keyword or static initialization

  • Example: Database connection manager

Add your answer
right arrow

Q12. Internal working of Hashmap

Ans.

Hashmap is a data structure that stores key-value pairs and uses hashing to retrieve values quickly.

  • Hashmap uses an array to store the key-value pairs

  • The keys are hashed to generate an index in the array

  • If two keys hash to the same index, a linked list is used to store the values

  • Retrieving a value involves hashing the key to find the index and then traversing the linked list if necessary

Add your answer
right arrow

Q13. What are constructor?

Ans.

Constructors are special methods in a class that are used to initialize objects.

  • Constructors have the same name as the class they belong to.

  • They are called automatically when an object is created.

  • Constructors can have parameters to initialize object properties.

  • Example: public class Person { public Person(String name) { this.name = name; }}

Add your answer
right arrow

Q14. Define Opps concept

Ans.

OOPs concept stands for Object-Oriented Programming, a programming paradigm based on the concept of objects.

  • OOPs focuses on creating objects that contain both data and methods to manipulate that data.

  • Encapsulation, inheritance, polymorphism, and abstraction are the four main principles of OOPs.

  • Example: Inheritance allows a class to inherit properties and behavior from another class, promoting code reusability.

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

Interview Process at Newgen Software Technologies Software Developer

based on 12 interviews
4 Interview rounds
Technical Round
HR Round
Aptitude Test Round
Personal Interview1 Round
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

Infosys Logo
3.6
 • 122 Interview Questions
Oracle Logo
3.7
 • 45 Interview Questions
eBay Logo
3.8
 • 12 Interview Questions
View all
Recently Viewed
INTERVIEWS
Accenture
Fresher
10 top interview questions
INTERVIEWS
Genpact
Fresher
20 top interview questions
INTERVIEWS
Infosearch BPO Services
No Interviews
INTERVIEWS
Accenture
5.6k top interview questions
INTERVIEWS
Accenture
No Interviews
INTERVIEWS
Accenture
100 top interview questions
INTERVIEWS
Genpact
No Interviews
INTERVIEWS
Genpact
200 top interview questions
INTERVIEWS
Publicis Sapient
10 top interview questions
INTERVIEWS
Genpact
10 top interview questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
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