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

Intern

Atlassian
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: C, C++, Java, Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming, Operating System, Networking
Tip
Tip

Tip 1 : Must do Previously asked Interviews Questions.
Tip 2 : Prepare OS, DBMS, OOPs, Computer Networks well.
Tip 3 : Prepare well for one project mentioned in the resume, the interviewer may ask any question related to the project, especially about the networking part of the project.

Application process
Where: Referral
Eligibility: None
Resume Tip
Resume tip

Tip 1 : Have at least 2 good projects mentioned in your resume with a link
Tip 2 : Focus on skills, internships, projects, and experiences.
Tip 3 : Make it simple, crisp, and one page

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 Minutes
Interview date1 May 2019
Coding problem2

This was an online test held on the hackerearth platform. The test consists of two coding questions with test duration of 90 Mins.

1. Best Time to Buy and Sell Stock II

Moderate
22m average time
0/80
Asked in companies
Goldman SachsPhonePeLinkedIn

You have been given stock values/prices for N number of days. Every i-th day signifies the price of a stock on that day. Your task is to find the maximum profit which you can make by buying and selling the stocks.

 Note :
You may make as many transactions as you want but can not have more than one transaction at a time i.e, if you have the stock, you need to sell it first, and then only you can buy it again.
Problem approach

Solution in Java

class Solution {
public int maxProfit(int[] prices) {
int bd = 0;
int sd = 0;
int profit = 0;

for(int i=1; i= prices[i-1]){
sd++;
} else{
profit += prices[sd] - prices[bd];
bd = sd = i;
}
}

profit += prices[sd] - prices[bd];
return profit;
}
}

Try solving now

2. Gas Stations

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

You have been given a circular path. There are 'N' petrol pumps on this path that are numbered from 0 to N - 1 (Both inclusive). Each petrol pump has two values associated with it:

1)The amount of petrol that is available at this particular petrol pump.
2)The distance to reach the next petrol pump.

You are on a truck having an empty tank of infinite capacity. You can start the tour from any of the petrol pumps. Your task is to calculate the first petrol pump from where the truck will be able to complete the full circle or determine if it is impossible to do so.

You may assume that the truck will stop at every petrol pump and it will add the petrol from that pump to its tank. The truck will move one kilometre for each litre of petrol consumed.

Problem approach

public int canCompleteCircuit(int[] gas, int[] cost) {
int n = gas.length;
int curr = 0;
int start = 0;
for (int i = 0; i < 2 * n; i++) {

if (i == start + n) {
return start;
}

int index = i % n;
curr = curr + gas[index] - cost[index];
if (curr < 0) {
start = i + 1;
curr = 0;
}
}
return -1;
}

Try solving now
02
Round
Easy
Video Call
Duration60 Minutes
Interview date1 May 2019
Coding problem2

This was first technical round based on problem solving skills and my coding ability. The interviewer was very friendly and helped my whenever I strucked.

We write code on google docs in this round on the screen share

1. Decode Ways

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

Given a string ‘strNum’ which represents a number, your task is to find the ways to decode the given string ‘strNum’.

The format of encoding is as follows: ‘A’ - 1, ‘B’ - 2, ‘C’ - 3, ‘D’ - 4, ……………, ‘Z’ - 26.

Encoding is possible in letters from ‘A’ to ‘Z’. There is an encoding between character and number.

Example :

subsequence

‘n = 226’ so we can decode ‘226’ in such a way-

‘BZ = 2-26’, as B maps to 2 and Z maps to 26.

‘BBF = 2-2-6’

‘VF = 22-6’

‘226; can be decoded in three ‘BZ’, ‘BBF’, ‘VF’ possible ways.

Point to be noticed we can’t decode ‘226’ as ‘226’ because we have no character which can directly map with ‘226’ we can only decode numbers from ‘1’ to ‘26’ only.

Problem approach

C++ solution with O(n) time-complexity & O(1) Space.

class Solution {
public:
int numDecodings(string s) {
if(s[0]=='0')
return 0;
const int n = s.size();
// two integer to store current ways 
int last_is_single_digit = 1, last_is_double_digit = 0, tmp;
for(int i=1; i tmp = last_is_single_digit;
if(s[i]=='0')
last_is_single_digit = 0; //If s[i] is 0, it must be decode as a double digit
else
last_is_single_digit += last_is_double_digit;
if(s[i-1] != '0' && (s[i-1] - '0') * 10 + (s[i] - '0') < 27)
last_is_double_digit = tmp; //If s[i-1] & s[i] can be decode to a char
else
last_is_double_digit = 0;
}
return last_is_single_digit + last_is_double_digit;
}
};

Try solving now

2. Single Number

Easy
10m average time
90% success
0/40
Asked in companies
AmazonCultfitAtlassian

You are given an array A of length N, where N is always an odd integer. There are (N-1)/2 elements in the array that occur twice and one element which occurs once.

Your task is to find the only element that occurs once in the array.

Note: There are (N-1)/2+1 elements that are unique in the array.

Example:
Consider the array be 1,6,4,6,2,4,2
The integers 2, 4, 6 occur twice and only the integer 1 occurs once. 
Problem approach

Code (C++)

class Solution {
public:
int singleNumber(vector& arr) {
int n = arr.size(); // taking the size of the array 

unordered_map mp; // unordered map to store the frequency

// storing frequency in the map
for(int i = 0; i < n; i++)
{
mp[arr[i]]++;
}

int ans; // variable to store our answer
for(auto x: mp) // traverse from the map
{
if(x.second == 1) //if frequency of any elemennt is 1
{
ans = x.first; // store in our answer
break; // break the loop, as we got our answer now
}
}

return ans; // return ans
}
};

Try solving now
03
Round
Medium
Video Call
Duration70 Minutes
Interview date2 May 2019
Coding problem2

This was technical + HR round taken by the senior manager from atlassian. Interviewer started with his introduction then asked my introduce myself. 

He asked hard problem and wanted me to give multiple solutions and improve the time complexity.
After solving coding questions there were some HR round questions.

1. Best Time to Buy and Sell Stock III

Hard
0/120
Asked in companies
Samsung R&D InstituteMicrosoftSalesforce

You are Harshad Mehta’s friend. He told you the price of a particular stock for the next ‘n’ days.


You are given an array ‘prices’ which such that ‘prices[i]’ denotes the price of the stock on the ith day.


You don't want to do more than 2 transactions. Find the maximum profit that you can earn from these transactions.


Note

1. Buying a stock and then selling it is called one transaction.

2. You are not allowed to do multiple transactions at the same time. This means you have to sell the stock before buying it again. 
Example:
Input: ‘n’ = 7, ‘prices’ = [3, 3, 5, 0, 3, 1, 4].

Output: 6

Explanation: 
The maximum profit can be earned by:
Transaction 1: Buying the stock on day 4 (price 0) and then selling it on day 5 (price 3). 
Transaction 2: Buying the stock on day 6 (price 1) and then selling it on day 6 (price 4).
Total profit earned will be (3 - 0) + ( 4 - 1) = 6. 
Problem approach

Solution in C++

int maxProfit(vector& prices) {
int n = prices.size();
// vector>>dp(n+1, vector>(2, vector(3, 0)));
// return f(0, 1, 0, prices, n, dp);


vector>next(2, vector(3, 0)), cur(2, vector(3, 0));
for(int i=n-1; i>=0; i--) {
for(int buy = 0; buy<2; buy++) {
for(int t=1; t>=0; t--) {
int profit = 0;
if(buy) {
profit = max(-prices[i] + next[0][t], next[1][t]);
}
else 
profit = max(prices[i] + next[1][t+1], next[0][t]);

cur[buy][t]=profit;
}
}
next = cur;
}
return next[1][0];
}

Try solving now

2. Basic HR Questions

why should we hire you?
Why Atlassian over other companies ?
Tell one incident when you were not able to cooperate with your team member and how did you work together.
Will you work for us if you got another offer google
How will you resolve conflict with your manager

Problem approach

Tip 1 : Make sure your resume is up-to-date
Tip 2 : Be confident and focus on your communication
Tip 3 : Prepare for the behavioral questions

Here's your problem of the day

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 2
5 rounds | 5 problems
Interviewed by Atlassian
12946 views
2 comments
0 upvotes
company logo
SDE - 1
5 rounds | 5 problems
Interviewed by Atlassian
5406 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 4 problems
Interviewed by Atlassian
3673 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 5 problems
Interviewed by Atlassian
3839 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Intern
3 rounds | 4 problems
Interviewed by CIS - Cyber Infrastructure
651 views
0 comments
0 upvotes
company logo
Intern
2 rounds | 2 problems
Interviewed by Microsoft
1500 views
0 comments
0 upvotes
company logo
Intern
2 rounds | 2 problems
Interviewed by Adobe
1020 views
0 comments
0 upvotes