Atlassian
60+ Statfinity Interview Questions and Answers
Q1. K Most Frequent Words Problem Statement
Given an array of N
non-empty words and an integer K
, return the K
most frequent words sorted by their frequency from highest to lowest.
Example:
Input:
N = 6, K = 2
words...read more
Given an array of words and an integer k, return the k most frequent words sorted by frequency.
Use a hashmap to count the frequency of each word
Use a priority queue to keep track of the k most frequent words
Sort the priority queue based on frequency and lexicographical order
Q2. Structurally Unique Binary Trees of Dragon Balls
Goku has ‘N’ Dragon Balls, where each Dragon Ball is unique. The ith Dragon Ball has ‘i’ stars on it, meaning the first Dragon Ball has 1 star, the second has 2 ...read more
Count the number of structurally unique binary trees that can be constructed with given Dragon Balls.
Use dynamic programming to solve this problem efficiently.
The number of structurally unique binary trees can be calculated using Catalan numbers.
For each test case, calculate the number of structurally unique binary trees modulo 10^9 + 7.
Return the count of unique binary trees for each test case.
Q3. Ninja and His Meetings Problem Statement
Ninja has started a new startup with a single conference room available for meetings. Given an array/list MEETINGS
of consecutive appointment requests, Ninja must decide...read more
Find the maximum total booked minutes possible in a conference room for given meeting durations with a 15-minute break between meetings.
Iterate through the list of meeting durations and calculate the maximum total booked minutes by considering the 15-minute break constraint.
Keep track of the total booked minutes and skip consecutive meetings that violate the break constraint.
Return the maximum total booked minutes for each test case.
Q4. Find K'th Character of Decrypted String
You are given an encrypted string where repeated substrings are represented by the substring followed by its count. Your task is to find the K'th character of the decrypt...read more
Given an encrypted string with repeated substrings represented by counts, find the K'th character of the decrypted string.
Parse the encrypted string to extract substrings and their counts
Iterate through the substrings and counts to build the decrypted string
Track the position in the decrypted string to find the K'th character
Q5. Quick Sort Problem Statement
You are provided with an array of integers. The task is to sort the array in ascending order using the quick sort algorithm.
Quick sort is a divide-and-conquer algorithm. It involve...read more
Yes, the quick sort algorithm can be enhanced to achieve NlogN complexity in the worst case by using randomized quick sort or median of three pivot selection.
Use randomized quick sort to randomly select the pivot element, reducing the chances of worst-case scenarios.
Implement median of three pivot selection to choose a pivot that is closer to the median value, improving partitioning efficiency.
Consider using dual pivot quick sort for further optimization in certain cases.
Exam...read more
Q6. Weighted Job Scheduling Problem Statement
You have 'N' jobs, each with a start time, end time, and profit. Your task is to identify the maximum profit that can be earned by scheduling these jobs such that no tw...read more
The Weighted Job Scheduling problem involves maximizing profit by scheduling non-overlapping jobs with given start times, end times, and profits.
Sort the jobs by end time in ascending order.
Initialize an array 'dp' to store maximum profit at each job index.
For each job, find the latest non-overlapping job and update 'dp' with the maximum profit.
Return the maximum profit from 'dp'.
Q7. Total Unique Paths Problem Statement
You are located at point ‘A’, the top-left corner of an M x N matrix, and your target is point ‘B’, the bottom-right corner of the same matrix. Your task is to calculate the...read more
Calculate total unique paths from top-left to bottom-right corner of a matrix by moving only right or down.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the number of unique paths for each cell.
Initialize the first row and first column with 1 as there is only one way to reach them.
For each cell, the number of unique paths is the sum of the paths from the cell above and the cell to the left.
Return the value in the bottom-right corner of t...read more
Q8. Reorder Edges Problem Statement
Given a connected directed acyclic graph with 'N' nodes and 'N-1' edges, where each pair of nodes is connected by exactly one edge, you can perform the following operation any nu...read more
The task is to implement a function that reorders edges in a directed acyclic graph to ensure a directed path exists from every node to node 0 with minimum edge reversals.
Iterate through the graph to find the shortest path from each node to node 0.
Determine the number of edge reversals needed to create a directed path from each node to node 0.
Implement a function that performs the edge reversal operation efficiently.
Consider using graph traversal algorithms like BFS or DFS to...read more
Q9. Job Scheduling Problem
You are provided with a list of jobs, where each job has a specific deadline and profit. The goal is to schedule these jobs such that the total profit is maximized. Each job requires exac...read more
The goal is to schedule jobs to maximize profit while meeting deadlines. Each job takes one unit of time and only one job can be scheduled at a time.
Sort the jobs in decreasing order of profit
Iterate through the sorted jobs and schedule them based on their deadlines
Keep track of the total profit achieved
Ensure each job is completed before its deadline
Q10. Snake and Ladder Problem Statement
Given a 'Snake and Ladder' board with N rows and N columns, where positions are numbered from 1 to (N*N) starting from the bottom left, alternating direction each row, find th...read more
Find the minimum number of dice throws required to reach the last cell on a 'Snake and Ladder' board.
Use Breadth First Search (BFS) algorithm to find the shortest path from the starting cell to the last cell.
Maintain a queue to keep track of the cells to be visited next.
Consider the effect of snakes and ladders on the movement of the player.
Handle the boundary conditions and constraints specified in the problem statement.
Return the minimum number of throws required to reach t...read more
Q11. Ninja and Geometry Problem Statement
In this problem, Ninja is provided with two lines on a 2D plane. The first line 'AB' is determined by two points A and B. The second line 'PQ' is determined by two points P ...read more
Calculate the intersection point of two lines on a 2D plane with precision up to six decimal places.
Parse input integers for each test case
Implement line intersection algorithm
Handle precision up to six decimal places in output
Return -1.000000 -1.000000 if lines do not intersect
Q12. Minimum Number of Platforms Problem
Your task is to determine the minimum number of platforms required at a railway station so that no train has to wait.
Explanation:
Given two arrays:
AT
- representing the ar...read more
Determine the minimum number of platforms needed at a railway station so that no train has to wait.
Sort the arrival and departure times arrays in ascending order.
Use two pointers to iterate through the arrays and keep track of the number of platforms needed.
Increment the number of platforms needed when a train arrives and decrement it when a train departs.
Return the maximum number of platforms needed at any point.
Example: Input: T = 1, N = 3, AT = [900, 940, 950], DT = [910, ...read more
Q13. Spell Checker Problem Statement
You are provided with a list of strings, DICTIONARY[]
, representing the correct spellings of words, and a query string QUERY
that may contain misspelled words. Your task is to ve...read more
Given a list of correct spellings and a query string, return a list of suggested correct spellings if the query is misspelled.
Iterate through the dictionary to check for matching prefixes with the query string.
If a match is found, add the corresponding word to the list of suggestions.
Return the list of suggestions if the query is misspelled, otherwise return an empty list.
Q14. Spiral Order Traversal of a Binary Tree
Given a binary tree with N
nodes, your task is to output the Spiral Order traversal of the binary tree.
Input:
The input consists of a single line containing elements of ...read more
Implement a function to return the spiral order traversal of a binary tree.
Traverse the binary tree level by level, alternating between left to right and right to left.
Use a queue to keep track of nodes at each level.
Append nodes to the result list in the order they are visited.
Low-level languages interact directly with hardware, while high-level languages are more abstract and easier to read/write.
Low-level languages are closer to machine code and hardware, while high-level languages are closer to human language.
Low-level languages require more manual memory management and are less portable, while high-level languages have automatic memory management and are more portable.
Examples of low-level languages include Assembly and C, while examples of hig...read more
Design a snake game
Use a 2D array to represent the game board
Keep track of the snake's position and direction
Handle user input to change the snake's direction
Update the snake's position and check for collisions with walls or itself
Add food to the board and handle eating it to grow the snake
Keep track of the score and display it to the player
Q17. Difference between git and Mercurial, How do you resolve merge conflicts, How do you start services in Linux/Windows, Java thread dump, heap dump, deadlock
Answering questions on Git, Mercurial, Linux/Windows services, Java thread dump, heap dump, and deadlock
Git and Mercurial are both version control systems, but Git is more popular and has a steeper learning curve
Merge conflicts occur when two or more people make changes to the same file at the same time, and can be resolved using tools like Git's merge tool or Mercurial's merge tool
Starting services in Linux can be done using the systemctl command, while in Windows it can be ...read more
Q18. Take any example in ticket closing and explain how will you do hypothesis testing
Hypothesis testing in ticket closing example
Define null and alternative hypothesis
Choose appropriate statistical test
Set significance level
Collect data and calculate test statistic
Determine p-value and compare with significance level
Make conclusion and interpret results
Q19. How will you optimize ticket closing process
I will streamline the process by identifying bottlenecks and implementing automation.
Analyze current process flow
Identify areas of delay or inefficiency
Implement automation tools to reduce manual effort
Set up clear communication channels between team members
Track progress and adjust as needed
Q20. What is your approach to managing opposing directions from different leads?
I prioritize clear communication, seek common ground, and involve all stakeholders in decision-making.
Open communication with all leads to understand their perspectives
Identify common goals and areas of agreement
Involve all stakeholders in decision-making process
Seek compromise or alternative solutions when necessary
Q21. Design File System : You have given file size and collection in input 1 : get total size 2 : find top k collections in size
Design a file system to calculate total size and find top k collections in size.
Create a file system class with methods to add files and calculate total size.
Maintain a data structure to store the collections and their sizes.
Implement a method to find the top k collections based on size.
Consider using a priority queue or sorting the collections based on size.
Handle edge cases like empty collections or invalid input sizes.
Q22. Write code to find count of characters in string.
Count characters in a string using array of strings.
Iterate through each string in the array
For each string, iterate through each character and increment count
Return the total count of characters
Q23. A file will have special tag call container , list all the k container with max usgae
List all containers with max usage of the special tag 'container'.
Identify all containers with the special tag 'container'.
Calculate the usage of each container.
Find the container(s) with the maximum usage.
Q24. How can you handeling the customer
Handling customers involves active listening, empathy, problem-solving, and effective communication.
Listen actively to understand the customer's concerns
Show empathy and understanding towards the customer's situation
Offer solutions or alternatives to resolve the issue
Communicate clearly and effectively to ensure the customer's needs are met
Follow up to ensure customer satisfaction
Q25. Binary search to get left and right index of an element in a sorted array
Binary search algorithm can be used to find the left and right index of an element in a sorted array.
Initialize left and right pointers to 0 and length-1 respectively.
While left <= right, calculate mid index and compare element with array[mid].
If element is found, update left and right pointers accordingly for left and right index.
If element is not found, adjust left or right pointer based on comparison with array[mid].
Q26. implement method which returns total usage
Implement a method to return total usage
Create a method that calculates the total usage by summing up individual usage values
Ensure the method can handle different types of usage data (e.g. integers, floats)
Consider implementing error handling for invalid input data
Test the method with sample data to verify its accuracy
Q27. Create a tic tac toe game taking number of boards as a parameter
Create a tic tac toe game with customizable number of boards.
Accept number of boards as a parameter
Create a 3x3 grid for each board
Implement logic to check for winning combinations on each board
Q28. Rate Limiter with possible test cases
Rate limiter is a mechanism to control the rate of requests sent to a server
Implement a sliding window algorithm to track the number of requests within a specific time frame
Set a limit on the number of requests allowed per unit of time
Return an error response when the limit is exceeded
Test cases: 1. Send requests below the limit - should be successful. 2. Send requests above the limit - should receive an error response.
Q29. Design + Coding round for rate limiter
Rate limiter design using token bucket algorithm
Use token bucket algorithm to limit the rate of requests
Maintain a bucket with tokens that get refilled at a constant rate
Each request consumes a token from the bucket, rejecting requests when no tokens are available
Q30. Assessment of Atlassian values
Atlassian values are centered around teamwork, openness, and customer focus.
Atlassian values collaboration and encourages employees to work together to achieve common goals.
Openness is a key value, with transparency and honesty being highly valued.
Customer focus is a top priority, with a commitment to delivering high-quality products and services that meet customer needs.
Other values include innovation, continuous improvement, and a focus on results.
Examples of Atlassian valu...read more
Q31. How you resolve a DNS query
To resolve a DNS query, you can use various methods such as checking the DNS cache, querying authoritative DNS servers, and troubleshooting network connectivity.
Check the local DNS cache for a matching entry
Query the recursive DNS server configured on the device
If the recursive server doesn't have the answer, it queries authoritative DNS servers
Troubleshoot network connectivity issues if DNS resolution fails
Q32. What is ur IRR ?
IRR stands for Internal Rate of Return, a financial metric used to evaluate the profitability of an investment.
IRR is a discount rate that makes the net present value of all cash flows from an investment equal to zero.
It is used to compare the profitability of different investment opportunities.
A higher IRR indicates a more profitable investment.
For example, if an investment has an IRR of 10%, it means that the investment is expected to generate a return of 10% per year.
Q33. How do you measure project success?
Project success can be measured by meeting project goals, staying within budget and timeline, and receiving positive feedback from stakeholders.
Meeting project goals and objectives
Staying within budget and timeline
Receiving positive feedback from stakeholders
Achieving desired outcomes and deliverables
Maintaining high team morale and engagement
Q34. How can you do feature selection?
Feature selection can be done using techniques like filter methods, wrapper methods, and embedded methods.
Filter methods involve selecting features based on statistical measures like correlation, chi-squared test, etc.
Wrapper methods use a specific machine learning algorithm to evaluate the importance of features through iterative selection.
Embedded methods incorporate feature selection within the model training process, like Lasso regression for sparse feature selection.
Exam...read more
Q35. Design Snake Game (Nokia based)
Design a classic Snake game based on Nokia phones.
Use a 2D array to represent the game board.
Implement logic for snake movement and growth.
Include collision detection with walls and itself.
Add food items for the snake to eat and grow.
Display the game on a grid-based interface.
Q36. Train a Decision Tree based on dataset provided?
Train a Decision Tree based on provided dataset.
Preprocess the dataset by handling missing values and encoding categorical variables.
Split the dataset into training and testing sets.
Train the Decision Tree model on the training set.
Evaluate the model's performance on the testing set using metrics like accuracy or F1 score.
Q37. What do you know abt rate limiting
Rate limiting is a technique used to control the number of requests or actions a user or system can perform within a certain time frame.
Rate limiting helps prevent abuse, protect resources, and ensure fair usage.
It sets limits on the number of requests or actions allowed per user, IP address, or API key.
Rate limits can be defined based on time intervals, such as requests per second, minute, or hour.
When the limit is reached, further requests may be denied, delayed, or throttl...read more
Q38. What is encapsulation
Encapsulation is the concept of bundling data and methods that operate on the data into a single unit, known as a class.
Encapsulation helps in hiding the internal state of an object and restricting access to it.
It allows for better control over the data by preventing direct modification from outside the class.
Access to the data is provided through methods, which can enforce validation rules and ensure data integrity.
Example: In a class representing a bank account, the balance...read more
Q39. Solution designs at my current job
I have extensive experience in creating solution designs at my current job.
I have led multiple cross-functional teams to develop innovative solutions
I have a strong background in analyzing requirements and translating them into technical designs
I have successfully implemented various solutions to improve efficiency and productivity
I have experience in presenting and defending solution designs to stakeholders
Q40. What is JVM and JDK ?
JVM stands for Java Virtual Machine, which is a virtual machine that enables a computer to run Java programs. JDK stands for Java Development Kit, which is a software development kit used to develop Java applications.
JVM is responsible for executing Java bytecode and translating it into machine code.
JDK includes tools for developing, debugging, and monitoring Java applications.
JDK contains JRE (Java Runtime Environment) which includes JVM, libraries, and other necessary compo...read more
Q41. Strong consistency vs eventual consistency
Strong consistency ensures that all replicas of data are updated synchronously, while eventual consistency allows for temporary inconsistencies.
Strong consistency guarantees that all clients see the same data at the same time.
Eventual consistency allows for temporary inconsistencies but eventually all replicas will converge to the same state.
Strong consistency is often used in systems where data integrity is critical, such as financial transactions.
Eventual consistency is com...read more
Q42. calculate the size of the file system
Calculating the size of a file system
Determine the total size of all files and directories within the file system
Include the size of all subdirectories and their contents
Consider the size of metadata and file system overhead
Use appropriate tools or commands to gather the necessary information
Q43. What isinheritance
Inheritance is a mechanism in object-oriented programming where a class inherits properties and behaviors from another class.
Allows a class to inherit attributes and methods from another class
Promotes code reusability and reduces redundancy
Creates a parent-child relationship between classes
Example: Class 'Car' can inherit from class 'Vehicle' and inherit properties like 'speed' and methods like 'drive()'
Q44. What is polymorphism
Polymorphism is the ability of a single function or method to operate on different types of data.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding).
Example: Animal superclass with Dog and Cat subclasses. Both Dog and Cat can be treated as Animals.
Q45. What is abstraction
Abstraction is the concept of hiding complex implementation details and showing only the necessary features to the user.
Abstraction allows developers to focus on what an object does rather than how it does it
It helps in reducing complexity and improving code readability
Example: In Java, abstract classes and interfaces are used to achieve abstraction
Q46. Simple DSA problem of DFS and BFS
DFS and BFS are fundamental graph traversal algorithms used to explore nodes in a graph.
DFS (Depth First Search) explores as far as possible along each branch before backtracking. It uses a stack to keep track of nodes.
BFS (Breadth First Search) explores all the neighbor nodes at the present depth prior to moving on to the nodes at the next depth. It uses a queue to keep track of nodes.
Example: For a graph with nodes A, B, C, D and edges (A, B), (A, C), (B, D), DFS would visi...read more
Q47. Create a feature flag component
Feature flag component to control feature toggling in the application
Create a component that accepts a feature flag name as prop
Check if the feature flag is enabled or disabled
Render the component content based on the feature flag status
Q48. What is heap memory ?
Heap memory is a region of a computer's memory that is used for dynamic memory allocation.
Heap memory is allocated at runtime and can be accessed randomly.
It is used for storing objects and data structures that need to be dynamically allocated and deallocated.
Heap memory is managed by the programmer and not automatically by the system.
Examples of heap memory usage include creating objects in Java using the 'new' keyword or allocating memory using malloc() in C.
Q49. How is ur ur culture
Our culture is collaborative, innovative, and inclusive.
We prioritize teamwork and encourage open communication.
We value creativity and encourage employees to share their ideas.
We strive to create a welcoming and diverse environment for all employees.
We prioritize work-life balance and offer flexible schedules and remote work options.
We prioritize professional development and offer opportunities for growth and learning.
Q50. update query in sql
An update query in SQL is used to modify existing records in a database.
Use the UPDATE keyword followed by the table name
Set the column(s) to be updated using SET
Specify the new values for the columns
Add a WHERE clause to specify which records to update
Q51. Find Top k collections
The question is asking to find the top k collections.
Use a sorting algorithm to sort the collections in descending order based on a specific criteria.
Select the top k collections from the sorted list.
Return the selected collections as an array of strings.
Q52. Longest increasing subsequence
Find the longest increasing subsequence in an array
Use dynamic programming to solve this problem
Iterate through the array and keep track of the longest increasing subsequence ending at each index
Time complexity can be optimized to O(n log n) using binary search
Q53. Give examples around values
Values are principles or beliefs that guide behavior and decision-making.
Values can include honesty, integrity, respect, and teamwork.
An example of values in action is a company prioritizing transparency in communication with employees.
Another example is an individual choosing to speak up against unethical behavior in the workplace.
Values can also be demonstrated through actions such as volunteering in the community or supporting diversity and inclusion initiatives.
Q54. Design and implement snake game
Snake game involves controlling a snake to eat food and grow in size without hitting walls or itself.
Create a grid system to represent the game board
Implement logic for snake movement and growth
Generate food randomly on the board for the snake to eat
Handle collision detection for walls and snake body
Keep track of score and game over conditions
Q55. System design for tagging system
Design a system for tagging system
Consider scalability and performance requirements
Use a unique identifier for each tag
Implement a search functionality for tags
Ensure data consistency and integrity
Consider security measures to prevent unauthorized access
Q56. Find total size
Calculate the total size of an array of strings.
Iterate through the array and sum the length of each string.
Use the `length` property of each string to get its size.
Handle edge cases such as empty strings or null values.
Q57. Importance of rest api
REST API is important for enabling communication between different systems and allowing them to exchange data and functionality.
REST API allows systems to communicate and exchange data in a standardized and scalable manner.
It enables integration between different applications and platforms, facilitating interoperability.
REST API simplifies the development process by providing a uniform interface for accessing and manipulating resources.
It promotes loose coupling between syste...read more
Q58. Troubleshoot with Har file
Troubleshooting with Har file involves analyzing network traffic and identifying issues.
Use a tool like Chrome Developer Tools or Fiddler to generate a Har file
Open the Har file in a Har viewer to analyze the network requests and responses
Look for errors, slow response times, or missing resources
Check for DNS resolution issues, network connectivity problems, or server-side errors
Compare the Har file with expected behavior or known good requests
Use the information from the Har...read more
Q59. Design Tagging System
Design a tagging system for organizing and categorizing data.
Consider the types of data to be tagged (e.g. text, images, videos)
Create a standardized set of tags and categories
Allow for multiple tags to be assigned to each piece of data
Implement a search function based on tags
Consider implementing a hierarchy of tags for more complex categorization
Q60. Design Snake game
Snake game is a classic arcade game where a player controls a snake to eat food and grow longer while avoiding collisions with walls and itself.
Create a grid-based game board where the snake can move in four directions (up, down, left, right)
Generate food randomly on the board for the snake to eat and grow in length
Implement collision detection to check if the snake hits the walls or itself
Update the game state continuously based on user input and game logic
Keep track of the ...read more
Q61. Design a web crawler
Design a web crawler to fetch and index web pages
Start by defining the scope of the crawler (e.g. which websites to crawl)
Implement a system to fetch web pages using HTTP requests
Parse the HTML content to extract relevant information (e.g. links, text)
Store the extracted data in a database or index for later retrieval
Implement a scheduling mechanism to prioritize and manage the crawling process
Q62. Favorite product
My favorite product is the iPhone because of its sleek design, user-friendly interface, and seamless integration with other Apple products.
Sleek design
User-friendly interface
Seamless integration with other Apple products
More about working at Atlassian
Top HR Questions asked in Statfinity
Interview Process at Statfinity
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month