A.P.T. PORTFOLIO PVT. LTD. interview experience Real time questions & tips from candidates to crack your interview

Data Analytics

A.P.T. PORTFOLIO PVT. LTD.
upvote
share-icon
3 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 12 Months
Topics: Data Structures, Algorithms, OOPS, DBMS, Machine Learning
Tip
Tip

Tip 1 : Start early and practice problems regularly.
Tip 2 : Give at least one contest in a week and upsolve the problems after the contest is over.
Tip 3 : For Machine Learning/ Data Science Roles, have a clear understanding of the basics like Linear Algebra, Probability.

Application process
Where: Campus
Eligibility: Above 8 cgpa
Resume Tip
Resume tip

Tip 1 : It is good to have an internship or some projects in your resume.
Tip 2 : Don't put some high-level ml algorithms in your resume unless you know the theory behind those algorithms.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 Minutes
Interview date15 Aug 2021
Coding problem3

The round was of 90 minutes.
The first section had 3 coding questions. (leetcode mediums)
The second section had problems based on probability and linear algebra and general mathematics.
The third section had MCQs based on some puzzles and cs fundamentals.

1. Pair Sum

Easy
15m average time
90% success
0/40
Asked in companies
OpenTextPhone PeGoogle

You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.

Note:

Each pair should be sorted i.e the first value should be less than or equals to the second value. 

Return the list of pairs sorted in non-decreasing order of their first value. In case if two pairs have the same first value, the pair with a smaller second value should come first.
Try solving now

2. Rotting Oranges

Moderate
20m average time
78% success
0/80
Asked in companies
MicrosoftAmazonApple

You have been given a grid containing some oranges. Each cell of this grid has one of the three integers values:

  • Value 0 - representing an empty cell.
  • Value 1 - representing a fresh orange.
  • Value 2 - representing a rotten orange.
  • Every second, any fresh orange that is adjacent(4-directionally) to a rotten orange becomes rotten.

    Your task is to find out the minimum time after which no cell has a fresh orange. If it's impossible to rot all the fresh oranges then print -1.

    Note:
    1. The grid has 0-based indexing.
    2. A rotten orange can affect the adjacent oranges 4 directionally i.e. Up, Down, Left, Right.
    
    Try solving now

    3. Longest Common Prefix

    Moderate
    40m average time
    60% success
    0/80
    Asked in companies
    AdobeGrofersDunzo

    You are given an array ‘ARR’ consisting of ‘N’ strings. Your task is to find the longest common prefix among all these strings. If there is no common prefix, you have to return an empty string.

    A prefix of a string can be defined as a substring obtained after removing some or all characters from the end of the string.

    For Example:
    Consider ARR = [“coding”, ”codezen”, ”codingninja”, ”coders”]
    The longest common prefix among all the given strings is “cod” as it is present as a prefix in all strings. Hence, the answer is “cod”.
    
    Try solving now
    02
    Round
    Easy
    Video Call
    Duration45 Minutes
    Interview date20 Aug 2021
    Coding problem2

    This round started with a brief discussion about my projects and previous internship(about 15 mins).
    Then it was followed by 2 coding questions(10-12 mins for the first question and 15 mins for the second question).
    The interviewer asked me if I had any questions. I asked 2-3 questions about the projects we will be working on the what exactly the company does.

    1. K-th largest Number BST

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

    You are given a binary search tree of integers with 'N' nodes. Your task is to return the K-th largest element of this BST.

    If there is no K-th largest element in the BST, return -1.

    A binary search tree (BST) is a binary tree data structure which has the following properties.

    • The left subtree of a node contains only nodes with data less than the node’s data.
    • The right subtree of a node contains only nodes with data greater than the node’s data.
    • Both the left and right subtrees must also be binary search trees.
    
    Try solving now

    2. Find Peak Element

    Easy
    15m average time
    85% success
    0/40
    Asked in companies
    GoogleAmazonOla

    You are given an array 'arr' of length 'n'. Find the index(0-based) of a peak element in the array. If there are multiple peak numbers, return the index of any peak number.


    Peak element is defined as that element that is greater than both of its neighbors. If 'arr[i]' is the peak element, 'arr[i - 1]' < 'arr[i]' and 'arr[i + 1]' < 'arr[i]'.


    Assume 'arr[-1]' and 'arr[n]' as negative infinity.


    Note:
    1.  There are no 2 adjacent elements having same value (as mentioned in the constraints).
    2.  Do not print anything, just return the index of the peak element (0 - indexed).
    3. 'True'/'False' will be printed depending on whether your answer is correct or not.
    


    Example:

    Input: 'arr' = [1, 8, 1, 5, 3]
    
    Output: 3
    
    Explanation: There are two possible answers. Both 8 and 5 are peak elements, so the correct answers are their positions, 1 and 3.
    


    Try solving now
    03
    Round
    Easy
    Video Call
    Duration70 Minutes
    Interview date20 Aug 2021
    Coding problem2

    It was a mix of HR+technical round. A senior person from the company took my interview. He first asked me about my interests and why I want to join this company and about my future goals. He then asked my favourite topic, and I said graphs. Then we had a good discussion on graphs and the different concepts and popular algorithms. Then he asked 2 coding questions, one related to graphs and one related to backtracking.
    After this, we had a brief discussion of some of my ML projects.

    1. Evaluate Division

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

    You are given an array of pairs of strings 'EQUATIONS', and an array of real numbers 'VALUES'. Each element of the 'EQUATIONS' array denotes a fraction where the first string denotes the numerator variable and the second string denotes the denominator variable, and the corresponding element in 'VALUES' denotes the value this fraction is equal to.

    You are given ‘Q’ queries, and each query consists of two strings representing the numerator and the denominator of a fraction. You have to return the value of the given fraction for each query. Return -1 if the value cannot be determined.

    Example :
    'EQUATIONS' = { {“a”, ”s”} , {“s”, “r”} }
    'VALUES' = { 1.5, 2 }
    queries = { {“a”, “r” } }
    
    For the above example (a / s) = 1.5 and (s / r) = 2 therefore (a / r) = 1.5 * 2 = 3.
    
    Try solving now

    2. Lexicographically Smallest Array

    Easy
    15m average time
    85% success
    0/40
    Asked in companies
    OlaZomatoPaytm (One97 Communications Limited)

    You have been given an array/list ARR consisting of ‘N’ integers. You are also given a positive integer ‘K’.

    Your task is to find the lexicographically smallest ARR that can be obtained by swapping at most K consecutive elements.

    An array/list P is lexicographically smaller than its permutation Q if and only if, for the earliest index at which P and Q differ, P's element at that index is smaller than Q's element at that index. Example, P = [1, 12, 4, 7, 8] is lexicographically smaller than Q = [1, 12, 8, 4, 7].

    For example, if ARR = [70, 60, 90, 21, 11] and K = 3, then-

    Swap 1: We swap adjacent elements 90 and 21. So, ARR after one swap is [70, 60, 21, 90, 11].
    Swap 2: We swap adjacent elements 60 and 21. So, ARR after one swap is [70, 21, 60, 90, 11].
    Swap 3: We swap adjacent elements 70 and 21. So, ARR after one swap is [21, 70, 60, 90, 11].
    The lexicographically smallest ARR after K = 3 swaps is [21, 70, 60, 90, 11].
    
    Try solving now

    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 create a function in JavaScript?

    Choose another skill to practice
    Start a Discussion
    Similar interview experiences
    company logo
    SDE - 1
    3 rounds | 7 problems
    Interviewed by OYO
    980 views
    0 comments
    0 upvotes
    SDE - 1
    2 rounds | 5 problems
    Interviewed by Meesho
    3238 views
    0 comments
    0 upvotes
    company logo
    SDE - 1
    3 rounds | 9 problems
    Interviewed by Salesforce
    592 views
    0 comments
    0 upvotes
    company logo
    System Engineer
    2 rounds | 2 problems
    Interviewed by Tata Consultancy Services (TCS)
    412 views
    0 comments
    0 upvotes