Green Apple Solutions Pvt Ltd interview experience Real time questions & tips from candidates to crack your interview

Java Developer

Green Apple Solutions Pvt Ltd
upvote
share-icon
3 rounds | 14 Coding problems

Interview preparation journey

expand-icon
Journey
I started preparing for this job interview during my graduation in the forth year as I have to apply for campus placements. I got to know about this from AMCAT. This drive was specially for the freshers. There were total 4 rounds 1. Coding Test 2. Technical Interview 3. Technical Interview 4. Hr Interview
Application story
I applied for this role through the Amcat. I submitted my resume after that I got shortlisted for the next round.
Why selected/rejected for the role?
I got rejected for this role because I wasn't able to give them best approach for the given coding problems.
Preparation
Duration: 3 months
Topics: Data Structures, Pointers, OOPS, Algorithms, Dynamic Programming, My SQL, Database, Operating System
Tip
Tip

Tip 1 : Practice Atleast 250 Questions on GFG/Leetcode
Tip 2 : For DSA questions in interviews, start explaining from the brute force approach and then move to the optimal one. Convey your thought process to the interviewers, so that they can help you out if you get stuck.
Tip 3 : Do not write anything that you are not confident of in resume
Tip 4 : Do atleast 2 projects

Application process
Where: Other
Eligibility: 60 percent
Resume Tip
Resume tip

Tip 1: Try to include at least one development project in your resume.
Tip 2: Interviewer will ask anything from your resume so be prepared for it.
Tip 3 : Don't mention some random projects which you are not sure about or copied from Google or somewhere else.

Interview rounds

01
Round
Easy
Coding Test - Pen and paper
Duration120 min
Interview date10 Mar 2023
Coding problem7

There were 8 Questions
6 coding questions
2 dbms questions

1. N-th Fibonacci Number

Moderate
40m average time
70% success
0/80
Asked in companies
MathworksAmazonOracle

You are 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 10^9 +7.

Fibonacci number is calculated using the following formula:
F(n) = F(n-1) + F(n-2), 
Where, F(1) = F(2) = 1.
For Example:
For ‘N’ = 5, the output will be 5.
Try solving now

2. Sum Of LCM

Moderate
15m average time
90% success
0/80
Asked in companies
GrofersSnapdeal Ltd.Green Apple Solutions Pvt Ltd

You are given an integer ‘N’ , calculate and print the sum of :

LCM(1,N) + LCM(2,N) + .. + LCM(N,N) 

where LCM(i,n) denotes the Least Common Multiple of the integers ‘i’ and ‘N’.

Try solving now

3. Check If The String Is A Palindrome

Easy
10m average time
90% success
0/40
Asked in companies
SprinklrCIS - Cyber InfrastructureSamsung

You are given a string 'S'. Your task is to check whether the string is palindrome or not. For checking palindrome, consider alphabets and numbers only and ignore the symbols and whitespaces.

Note :

String 'S' is NOT case sensitive.

Example :

Let S = “c1 O$d@eeD o1c”.
If we ignore the special characters, whitespaces and convert all uppercase letters to lowercase, we get S = “c1odeedo1c”, which is a palindrome. Hence, the given string is also a palindrome.
Try solving now

4. Quick Sort

Moderate
10m average time
90% success
0/80
Asked in companies
FreshworksSamsung R&D InstituteLenskart

You are given an array of integers. You need to sort the array in ascending order using quick sort.

Quick sort is a divide and conquer algorithm in which we choose a pivot point and partition the array into two parts i.e, left and right. The left part contains the numbers smaller than the pivot element and the right part contains the numbers larger than the pivot element. Then we recursively sort the left and right parts of the array.

Example:

Let the array = [ 4, 2, 1, 5, 3 ]
Let pivot to be the rightmost number.

example

After the 1st level partitioning the array will be { 2, 1, 3, 4, 5 } as 3 was the pivot. After 2nd level partitioning the array will be { 1, 2, 3, 4, 5 } as 1 was the pivot for the left part and 5 was the pivot for the right part. Now our array is sorted and there is no need to divide it again.

Try solving now

5. All Prime Numbers less than or equal to N

Moderate
10m average time
90% success
0/80
Asked in companies
OptumIBMAdobe

You are given a positive integer 'N'. Your task is to return all the prime numbers less than or equal to the 'N'.

Note:

1) A prime number is a number that has only two factors: 1 and the number itself.

2) 1 is not a prime number.
Problem approach

ht

Try solving now

6. DBMS Question

Explain Different keys in DBMS

7. DBMS Question

Two Table were given. we need to write a query for inner join.

02
Round
Medium
Face to Face
Duration45 min
Interview date10 Mar 2023
Coding problem3

This was technical round. Interviewer asked me 3 coding problem and one aptitude question and some questions from the projects I mentioned on my resume

1. Sorting Characters By Frequency

Moderate
25m average time
75% success
0/80
Asked in companies
Info Edge India (Naukri.com)AdobeUber

You have been given a string ‘S’.


You must return the string ‘S’ sorted in decreasing order based on the frequency of characters.

If there are multiple answers, return any of them.


Example :
Let 'S'= “abAb”. 

Here the characters ‘a’ and ‘A’ have frequency 1 and character ‘b’ has frequency ‘2’.  

Therefore the sorted string is “bbAa”. 
Problem approach

int count = 0;
for(int i = 0; i < str.length(); i++){
if(str[i] == ch) count++;
}
print(count);

Try solving now

2. Star Pattern

Easy
10m average time
85% success
0/40
Asked in companies
PayPalInfo Edge India (Naukri.com)Blackrock
Pattern for N = 4

picture

The dots represent spaces.
Try solving now

3. Sort Array

Moderate
15m average time
85% success
0/80
Asked in companies
SprinklrHSBCHCL Technologies

You are given an array consisting of 'N' positive integers where each integer is either 0 or 1 or 2. Your task is to sort the given array in non-decreasing order.

Note :
1. The array consists of only 3 distinct integers 0, 1, 2.
2. The array is non-empty.
Problem approach

We can use custom comparator for the sorting.

Try solving now
03
Round
Easy
Face to Face
Duration45 min
Interview date10 Mar 2023
Coding problem4

In this round interviewer asked me about my projects and I had to solve 2 coding problems

1. Middle Of Linked List

Easy
20m average time
80% success
0/40
Asked in companies
NoBrokerIBMHCL Technologies

Given a singly linked list of 'N' nodes. The objective is to determine the middle node of a singly linked list. However, if the list has an even number of nodes, we return the second middle node.

Note:
1. If the list is empty, the function immediately returns None because there is no middle node to find.
2. If the list has only one node, then the only node in the list is trivially the middle node, and the function returns that node.
Try solving now

2. Cycle Detection in a Singly Linked List

Moderate
15m average time
80% success
0/80
Asked in companies
GrabThalesSterlite Technologies Limited

You are given a Singly Linked List of integers. Return true if it has a cycle, else return false.


A cycle occurs when a node's next points back to a previous node in the list.


Example:
In the given linked list, there is a cycle, hence we return true.

Sample Example 1

Try solving now

3. Java Question

Why Java is platform independent ?

4. java Question

Difference between Abstract classes and interface

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6450 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes
Associate Software Engineer
3 rounds | 13 problems
Interviewed by Green Apple Solutions Pvt Ltd
2402 views
1 comments
0 upvotes
Companies with similar interview experiences
company logo
Java Developer
3 rounds | 20 problems
Interviewed by Ernst & Young (EY)
9061 views
2 comments
0 upvotes
company logo
Java Developer
3 rounds | 4 problems
Interviewed by SAP Labs
3148 views
0 comments
0 upvotes
company logo
Java Developer
2 rounds | 2 problems
Interviewed by HCL Technologies
7165 views
0 comments
0 upvotes