Athenahealth interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Athenahealth
upvote
share-icon
5 rounds | 10 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Other
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 minutes
Interview date11 May 2015
Coding problem2

10 Aptitude questions with difficulty level hard were asked in this test.

1. Aptitude Question

Minimum planes to go around the world

Problem approach

The idea is to take hold some planes in the middle, send some planes back and get the fuel to get the main plane fueled again. 
Let the three air plane be X, Y and Z. Let total circumference be 300 Units. So every plane can run 150 units.
Let X be the plane that will go around the world.
After 1/6th of the circumference (50 units), Y passes 1/3rd of its fuel to Z and returns (Y has fuel left to travel exactly 50 units).
Now Z has fuel left for 150 units (Completely filled). At 1/4th of the distance around the world, Z has fuel for 125 units and X has fuel for 75 units. Z completely fills the tank of X which is now able to fly to a point 3/4 of the way around the world.
Now Z has fuel for 50 units. Z now has only 1/3 of its fuel (can travel 50 units) left which is not enough to get back to the airport. But Y reaches it in time in order to refuel it, and both Y and Z air plane are the able to return safely to the airport.
Both Y and Z gets refuelled and fly towards X. Again Y refuels Z and returns to the to be refuelled. Z reaches X at the point where it has flown 3/4 around the world. This time Y and Z come from other direction so that the distance left is 1/4. (If they had come clockwise earlier, they come anti-clockwise this time).
All 3 aircraft can safely return to the home base

2. Aptitude Question

It rains 3 days a week. When it rains there is Thunderstorm. The probability of Thunderstorm falling on the ground is 1/42000. A Golfer plays golf on Saturday and Sunday. What is the probability of Thunderstorm falling on
that Golfer?

02
Round
Easy
Face to Face
Duration60 minutes
Interview date11 May 2015
Coding problem2

Technical Interview round with questions based on data structures and algorithms. Questions about previous projects done and my roles on it and my leadership capabilities. Few technical questions from Threads and multi-processing.

1. Search In A Row Wise And Column Wise Sorted Matrix

Moderate
15m average time
80% success
0/80
Asked in companies
AdobeOracleMicrosoft

You are given an 'N * N' matrix of integers where each row and each column is sorted in increasing order. You are given a target integer 'X'.


Find the position of 'X' in the matrix. If it exists then return the pair {i, j} where 'i' represents the row and 'j' represents the column of the array, otherwise return {-1,-1}


For example:
If the given matrix is:
[ [1, 2, 5],
  [3, 4, 9],
  [6, 7, 10]] 
We have to find the position of 4. We will return {1,1} since A[1][1] = 4.
Problem approach

The brute force solution is to traverse the array and to search elements one by one. Run a nested loop, outer loop for row and inner loop for the column
Check every element with x and if the element is found then print “element found”. If the element is not found, then print “element not found”.

Efficient Approach : The idea here is to remove a row or column in each comparison until an element is found. Start searching from the top-right corner of the matrix. There are three possible cases : 
1. The given number > the current number: This will ensure that all the elements in the current row are smaller than the given number as the pointer is already at the right-most elements and the row is sorted. Thus, the entire row gets eliminated and continues the search for the next row. 
2. The given number < the current number: This will ensure that all the elements in the current column are greater than the given number. Thus, the entire column gets eliminated and continues the search for the previous column, i.e. the column on the immediate left.
3. The given number == the current number: This will end the search.
• Algorithm: 
1. Let the given element be x, create two variable i = 0, j = n-1 as index of row and column
2. Run a loop until i = n
3. Check if the current element is greater than x then decrease the count of j. Exclude the current column.
4. Check if the current element is less than x then increase the count of i. Exclude the current row.
5. If the element is equal, then print the position and end.

Try solving now

2. Rectangular Numbers

Moderate
30m average time
70% success
0/80
Asked in companies
AdobeHSBCInfosys

Ninja has a number ‘N’. He wants to print the pattern in such a way that the outer rectangle is of the number ‘N’ and the number goes on decreasing as we move inside the rectangles.

For example, if ‘N’ = 4, then pattern will be:

4 4 4 4 4 4 4 
4 3 3 3 3 3 4 
4 3 2 2 2 3 4 
4 3 2 1 2 3 4 
4 3 2 2 2 3 4 
4 3 3 3 3 3 4 
4 4 4 4 4 4 4 
Problem approach

The number of rows or columns to be printed for given n will be 2*n – 1. 
We will print the matrix in two parts. First, print the upper half from rows from 0 to floor((2*n – 1)/2) and then second half from floor((2*n – 1)/2) + 1 to 2*n – 2. 
Now for each row, print it in three parts. First part is decreasing sequence which will start from n and decrease by 1 in each iteration. The number of iterations will be equal to row number, the second part is a constant sequence where constant is n – i and it will be print 2*n – 1 – 2 * row number, and the third part is increasing sequence which is nothing but opposite of the first sequence. 
For lower half, observe, it is a mirror image of upper half (excluding middle row). So, simply run a loop of the upper half from (2*n – 1)/2 to 0.

Try solving now
03
Round
Medium
Face to Face
Duration60 minutes
Interview date11 May 2015
Coding problem3

DSA based questions were asked in this round. Questions on implementation of Linux directory structure were also asked.

1. Binary Array Sorting

Easy
20m average time
85% success
0/40
Asked in companies
Paytm (One97 Communications Limited)OptumAthenahealth

A binary array is an array consisting of only 0s and 1s.

You are given a binary array "arr" of size ‘N’. Your task is to sort the given array and return this array after sorting.

Problem approach

A two-pointer approach can be used for this question. Maintain two indexes. Initialize the first index left as 0 and second index right as n-1, where n is size of the array .
While left < right , do the following : 
a) Keep incrementing index left while arr[left] =0 
b) Keep decrementing index right while arr[right]=1 
c) If left < right then exchange arr[left] and arr[right]

Try solving now

2. Next Greater Element

Moderate
20m average time
90% success
0/80
Asked in companies
PayPalSamsungDunzo

You are given an array arr of length N. You have to return a list of integers containing the NGE(next greater element) of each element of the given array. The NGE for an element X is the first greater element on the right side of X in the array. Elements for which no greater element exists, consider the NGE as -1.

For Example :

If the given array is [1, 3, 2], then you need to return [3, -1, -1]. Because for 1, 3 is the next greater element, for 3 it does not have any greater number to its right, and similarly for 2.
Problem approach

The brute force solution is to use two loops. The outer loop picks all the elements one by one. The inner loop looks for the first greater element for the element picked by the outer loop. If a greater element is found then that element is printed as next, otherwise, -1 is printed.
Time Complexity: O(N2) 
Auxiliary Space: O(1)

The above approach can be optimized using stack data structure. 
Steps :
Push the first element to stack.
Pick rest of the elements one by one and follow the following steps in loop : 
1. Mark the current element as next.
2. If stack is not empty, compare top element of stack with next.
3. If next is greater than the top element, Pop element from stack. next is the next greater element for the popped element.
4. Keep popping from the stack while the popped element is smaller than next. next becomes the next greater element for all such popped elements.
Finally, push the next in the stack.
After the loop in step 2 is over, pop all the elements from the stack and print -1 as the next element for them.

Try solving now

3. Technical Question

Difference between BST and Tries

Problem approach

A binary tree or a bst is typically used to store numerical values. The time complexity in a bst is O(log(n)) for insertion, deletion and searching. Each node in a binary tree has at most 2 child nodes.

Trie is an ordered tree structure, which is used mostly for storing strings (like words in dictionary) in a compact way. In a trie, every node (except the root node) stores one character. By traversing up the trie from a leaf node to the root node, a string can be constructed. By traversing down the trie from the root node to a node n, a common prefix can be constructed for all the strings that can be constructed by traversing down all the descendant nodes (including the leaf nodes) of node n.

04
Round
Easy
Face to Face
Duration60 minutes
Interview date11 May 2015
Coding problem2

This was a technical round. Questions about previous projects and current one were asked. I was also asked about aptitude problems from the first round and how I understood and approached towards solution?

1. N Queens

Hard
55m average time
35% success
0/120
Asked in companies
CIS - Cyber InfrastructureMicrosoftVisa

You are given an integer 'N'. For a given 'N' x 'N' chessboard, find a way to place 'N' queens such that no queen can attack any other queen on the chessboard.

A queen can be killed when it lies in the same row, or same column, or the same diagonal of any of the other queens. You have to print all such configurations.

Problem approach

DFS can be used to solve this problem. The idea is to place queens in different columns one by one, starting from the leftmost column. As we cannot place 2 queens in the same column, when we place the queen in the nth column and if its valid position, dfs again starting n+1 th column and try placing the next queen in all the rows of n+1th column and find a valid position. If no valid queen row found in n+1th row, backtrack and go to nth column, and change the queen position to the next row and repeat the process.

Try solving now

2. Form a Triangle

Easy
15m average time
80% success
0/40
Asked in companies
IndiaMartOYOPhonePe

You are given an integer of array/list 'ARR' of length ‘N. You are supposed to return true if it is possible to construct at least one non-degenerate triangle using values of array/list as sides of the triangle, otherwise, return false.

Problem approach

The key observation in the problem is three points form a triangle only when they don’t lie on the straight line, that is an area formed by the triangle of these three points is not equal to zero. 
Area of Triangle = (1/2)*(x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) 
The above formula is derived from shoelace formula.
So we will check if the area formed by the triangle is zero or not.

Try solving now
05
Round
Easy
HR Round
Duration30 minutes
Interview date11 May 2015
Coding problem1

Behavioral questions and team skills were discussed in this round.

1. Basic HR Question

Q1. Why Athena and why was I shifting from the old company in such a short period?

Problem approach

Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.

Here's your problem of the day

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

Skill covered: Programming

Which array operation has O(n) worst-case time complexity?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Athenahealth
2232 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
4325 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
1591 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 6 problems
Interviewed by Expedia Group
1171 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
108664 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
52875 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
32564 views
6 comments
0 upvotes