Add office photos
Engaged Employer

Paytm

3.3
based on 7k Reviews
Filter interviews by

50+ Dattson & Co Interview Questions and Answers

Updated 17 Jul 2024
Popular Designations
Q1. Reverse Linked List

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked lis...read more
View 6 more answers
Q2. Maximum Subarray Sum

Given an array of numbers, find the maximum sum of any contiguous subarray of the array.

For example, given the array [34, -50, 42, 14, -5, 86], the maximum sum would be 137, since we would ...read more

View 4 more answers
Q3. Rotting Oranges

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.
  • ...read more
  • View 2 more answers
    Q4. Delete a Node from Linked List

    You have been given a linked list of integers. Your task is to write a function that deletes a node from a given position, 'POS'.

    Note :
    Assume that the Indexing for the linked lis...read more
    View 3 more answers
    Discover Dattson & Co interview dos and don'ts from real experiences
    Q5. Clone Linked List with Random Pointer

    Given a linked list having two pointers in each node. The first one points to the next node of the list, however, the other pointer is random and can point to any node of th...read more

    View 4 more answers
    Q6. Quick Sort

    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 arr...read more

    View 4 more answers
    Are these interview questions helpful?
    Q7. Spiral Order Traversal of a Binary Tree

    You have been given a binary tree of 'N' nodes. Print the Spiral Order traversal of this binary tree.

    For example
    For the given binary tree [1, 2, 3, -1, -1, 4, 5, -1, -1,...read more
    View 3 more answers
    Q8. Minimum insertions to make a string palindrome

    A palindrome string is one that reads the same backward as well as forward. Given a string 'STR', you need to tell the minimum number of characters needed to insert...read more

    View 4 more answers
    Share interview questions and help millions of jobseekers 🌟
    Q9. zig zag traversal

    You have been given a Binary Tree of 'N' nodes, where the nodes have integer values. Your task is to print the zigzag traversal of the given tree.

    Note:
    In zigzag order, level 1 is printed from...read more
    View 5 more answers
    Q10. Longest Common Subsequence

    You have been given two Strings “STR1” and “STR2” of characters. Your task is to find the length of the longest common subsequence.

    A String ‘a’ is a subsequence of a String ‘b’ if ‘a’...read more

    View 4 more answers
    Q11. Minimum Fountains

    There is a one-dimensional garden of length 'N'. On each of the positions from 0 to 'N', there is a fountain, and this fountain’s water can reach up to a certain range as explained further. In ...read more

    View 2 more answers
    Q12. Sort An Array of 0s, 1s and 2s

    You have been given an array/list ARR consisting of ‘N’ elements. Each element in the array is either 0, 1 or 2.

    Now, your task is to sort this array/list in increasing order. For ...read more

    View 3 more answers
    Q13. Delete Node In A Linked List

    You are given a Singly Linked List of integers and a reference to the node to be deleted. Every node of the Linked List has a unique value written on it. Your task is to delete that ...read more

    View 2 more answers
    Q14. Next Greater Element

    For a given array/list of integers of size N, print the Next Greater Element(NGE) for every element. The Next Greater Element for an element X is the first element on the right side of X in ...read more

    View 3 more answers
    Q15. Group Anagrams Together

    You have been given an array/list of strings 'STR_LIST'. You are supposed to return the strings as groups of anagrams such that strings belonging to a particular group are anagrams of one...read more

    View 3 more answers
    Q16. Inorder Sucessor

    You have been given an arbitrary binary tree and a node of this tree. You need to find the inorder successor of this node in the tree.

    The inorder successor of a node in a binary tree is that no...read more

    View 4 more answers
    Q17. Maze obstacles

    Given a ‘N’ * ’M’ maze with obstacles, count and return the number of paths to reach the right-bottom cell from the top-left cell. A cell in the given maze has a value -1 if it is a blockage or de...read more

    View 3 more answers
    Q18. Delete middle node

    You have been given a singly Linked List of integers. Your task is to delete the middle node of this List.

    Note:

    1. If there is no middle node in the list to delete, return an empty list (i.e...read more
    View 2 more answers
    Q19. Add two linked lists

    You have been given two singly Linked Lists, where each of them represents a positive number without any leading zeros.

    Your task is to add these two numbers and print the summation in the ...read more

    View 3 more answers
    Q20. Merge Sort

    Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.

    Example :

    Merge Sort Algorithm - Merge sort is a Di...read more
    View 3 more answers
    Q21. Two Sum

    You are given an array of integers 'ARR' of length 'N' and an integer Target. Your task is to return all pairs of elements such that they add up to Target.

    Note:

    We cannot use the element at a given ind...read more
    View 2 more answers
    Q22. Find Smallest Integer

    You are given an array 'ARR' consisting of 'N' positive numbers and sorted in non-decreasing order, and your task is to find the smallest positive integer value that cannot be represented a...read more

    Ans.

    The task is to find the smallest positive integer value that cannot be represented as a sum of elements of any proper subset of the given array.

    • The array is sorted in non-decreasing order, so we can iterate through the array and keep track of the maximum sum we can form.

    • If the current element is greater than the maximum sum + 1, then the maximum sum + 1 is the smallest positive integer that cannot be represented.

    • If all elements in the array can be represented as a sum of subs...read more

    View 2 more answers
    Q23. Job Sequencing Problem

    You are given a N x 2 2-D array 'Jobs' of 'N' jobs where Jobs[i][0] denote the deadline of i-th job and Jobs[i][1] denotes the profit associated with i-th job.

    You will make a certain prof...read more

    View 2 more answers
    Q24. Closest Leaf To Given Node In Binary Tree

    Ninja is stuck in a maze which is in a form of a binary tree. He needs your help in order to get out.

    Ninja is presently at the node ‘X’. The only exit points of the maz...read more

    View 3 more answers
    Q25. Minimum number of platforms required

    You have been given two arrays, 'AT' and 'DT', representing the arrival and departure times of all trains that reach a railway station.

    Your task is to find the minimum numbe...read more

    Ans.

    This question asks to find the minimum number of platforms required at a railway station so that no train needs to wait.

    • Sort the arrival and departure times arrays in ascending order.

    • Initialize a variable 'platforms' to 1 and 'maxPlatforms' to 1.

    • Iterate through the arrival and departure times arrays simultaneously.

    • If the current arrival time is less than or equal to the current departure time, increment 'platforms'.

    • If 'platforms' is greater than 'maxPlatforms', update 'maxPla...read more

    View 4 more answers
    Q26. Bottom Right View of Binary Tree

    Given a binary tree. Your task is to print the bottom right view of the binary tree.

    Bottom right view, on viewing the given binary tree at the angle of 45 degrees from the botto...read more

    Add your answer
    Q27. Minimize Cash Flow

    You are given a list of ‘transactions’ between ‘n’ number of friends. who have to give each other money. The list consists of data of receiver, sender, and transaction.

    Your task is to minimiz...read more

    Add your answer
    Q28. Floor Value of X

    You are given a sorted array ‘A’ and an integer ‘X’. Your task is to find and return the floor value of ‘X’ in the array.

    The floor value of ‘X’ in array ‘A’ is the largest element in the array ...read more

    View 2 more answers
    Q29. Container with most water

    Given a sequence of ‘N’ space-separated non-negative integers A[1],A[2],A[3],......A[i]…...A[n]. Where each number of the sequence represents the height of the line drawn at point 'i'. ...read more

    View 2 more answers
    Q30. Lexicographically smallest array

    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 o...read more

    Add your answer
    Q31. Find subarray with given sum

    Given an array ARR of N integers and an integer S. The task is to find whether there exists a subarray(positive length) of the given array such that the sum of elements of the subar...read more

    View 3 more answers
    Q32. Camel and banana puzzle

    A person has 3000 bananas and a camel. He wants to transport the maximum number of bananas to a destination 1000 KMs away, using only the camel as a mode of transportation. The camel cann...read more

    Add your answer
    Q33. Operating System Questions

    Introduction of all my projects.
    What is serialization and deserialization in Java?
    Deep go through all the projects and technology used in projects Challenges you have faced and how did...read more

    Add your answer
    Q34. Technical Questions

    • Flow kotlin

    • Android 10 to Android 11 migration support

    • Kotlin cons and pros

    • Dagger! should we use it?

    • MVVM explain

    • Android versions with their features and specialities

    • Activity...read more

    Add your answer
    Q35. Operating System Questions

    Multithreading Concepts? How thread works in java?
    Difference in sleep() and wait().
    Print even odd using two threads. What is synchronization Block & why it is used?

    Add your answer
    Q36. Javascript Basics and Redux

    He asked me some output questions which were based on JavaScript fundamentals like hoisting, arrow function etc.
    Some questions were from Redux. At that time I didn't have any experien...read more

    Add your answer

    Q37. Write a function that returns '3' when '4' is passed as an input and vice versa without using if-else condition

    Ans.

    Function to swap '3' and '4' without using if-else

    • Use XOR operator to swap the values

    • Convert the input to ASCII code and perform the swap

    • Use a lookup table to map the values

    Add your answer

    Q38. A 2D matrix is given which is row wise and column wise sorted. Find a particular element from it

    Ans.

    Finding an element in a sorted 2D matrix

    • Start from the top right corner or bottom left corner

    • Compare the target element with the current element

    • Move left or down if the target is smaller, else move right or up

    • Repeat until the target is found or all elements are checked

    Add your answer
    Q39. LCA - Lowest Common Ancestor

    Given a binary tree (not a binary search tree) and two values say n1 and n2, write a program to find the least common ancestor.

    View 3 more answers
    Q40. Javascript Questions

    Main questions that were asked were based on callbacks, promises, Closures, Event loop.
    Some output guessing questions :
    1. Difference between let, var, const
    2. ES6 features
    3. Hoisting
    4. Rest,...read more

    Add your answer

    Q41. Find the odd repeating element from a set of repeating elements

    Ans.

    Find the odd repeating element from an array of strings

    • Use a hash table to count the frequency of each element

    • Iterate through the hash table to find the element with an odd count

    Add your answer
    Q42. Operating System based Questions

    Questions about scheduling algorithms, dead lock, synchronization etc. were asked.

    Add your answer

    Q43. design dictionary using trie....having operations of inserting a word, updating and deleting (needed to write full running code)

    Ans.

    Design a dictionary using trie with insert, update and delete operations.

    • Implement a Trie data structure with nodes containing a character and a boolean flag to indicate end of word

    • For insert operation, traverse the trie and add nodes for each character in the word

    • For update operation, delete the existing word and insert the updated word

    • For delete operation, mark the end of word flag as false and delete the node if it has no children

    • Use recursion for traversal and deletion

    • Exa...read more

    Add your answer
    Q44. Managerial Round

    He asked me some JavaScript questions again and also told me about the work culture of his team. It was more like an open discussion with some tech questions

    Add your answer

    Q45. Given a graph, print all the connected components in it.

    Ans.

    Print all the connected components in a given graph.

    • Traverse the graph using DFS or BFS algorithm.

    • Maintain a visited array to keep track of visited nodes.

    • For each unvisited node, perform DFS or BFS and add all visited nodes to a connected component.

    • Repeat until all nodes are visited.

    • Print all connected components.

    Add your answer

    Q46. SQL Query to find Nth highest salary from table

    Ans.

    SQL query to find Nth highest salary from table

    • Use ORDER BY and LIMIT clauses

    • Use subquery to get the Nth highest salary

    • Handle cases where there are less than N distinct salaries

    Add your answer
    Q47. DBMS Question

    What is sharding?

    Add your answer

    Q48. Puzzle on measuring exactly half a glass of water

    Ans.

    Fill the glass to the brim, then pour out exactly half.

    • Fill the glass completely with water

    • Pour the water into another container until the glass is half full

    • Pour the remaining water back into the glass

    Add your answer

    Q49. Write a program to find Minimum length of string in 'bdcabdcbaabbbac' containing substring 'abc'

    Ans.

    A program to find the minimum length of a string containing a given substring.

    • Use a sliding window approach to iterate through the string and check for the substring.

    • Keep track of the minimum length of the string containing the substring.

    • Return the minimum length found.

    Add your answer

    Q50. Write a program to Create a spiral array using 2D-array

    Ans.

    Program to create a spiral array using 2D-array

    • Create a 2D-array with given dimensions

    • Initialize variables for row, column, and direction

    • Fill the array in a spiral pattern by changing direction when necessary

    • Return the spiral array

    Add your answer

    Q51. Types of DS and a real life scenario.

    Ans.

    Types of DS and a real life scenario

    • Arrays - storing a list of names

    • Linked Lists - managing a playlist

    • Stacks - undo/redo functionality in text editors

    • Queues - managing customer requests in a call center

    • Trees - organizing files in a computer

    • Graphs - social network connections

    Add your answer

    Q52. OOPs in python and explain them

    Ans.

    OOPs in Python refers to Object-Oriented Programming concepts like classes, objects, inheritance, encapsulation, and polymorphism.

    • Classes: Blueprint for creating objects with attributes and methods.

    • Objects: Instances of classes that contain data and behavior.

    • Inheritance: Ability to create a new class based on an existing class.

    • Encapsulation: Restricting access to certain components of an object.

    • Polymorphism: Ability to use a single interface for different data types.

    Add your answer

    Q53. Build Basic LRU without Libraries

    Ans.

    Implement a basic LRU cache without using libraries

    • Create a data structure to store key-value pairs with a fixed size

    • Use a doubly linked list to keep track of the most recently used items

    • Implement methods to add, access, and remove items based on their usage

    • Update the linked list whenever an item is accessed or added

    Add your answer
    Contribute & help others!
    Write a review
    Share interview
    Contribute salary
    Add office photos

    Interview Process at Dattson & Co

    based on 13 interviews in the last 1 year
    3 Interview rounds
    Coding Test Round
    Technical Round
    One-on-one Round
    View more
    Interview Tips & Stories
    Ace your next interview with expert advice and inspiring stories

    Top Software Developer Interview Questions from Similar Companies

    3.6
     • 59 Interview Questions
    3.5
     • 37 Interview Questions
    4.4
     • 33 Interview Questions
    3.9
     • 15 Interview Questions
    4.2
     • 11 Interview Questions
    View all
    Share an Interview
    Stay ahead in your career. Get AmbitionBox app
    qr-code
    Helping over 1 Crore job seekers every month in choosing their right fit company
    70 Lakh+

    Reviews

    5 Lakh+

    Interviews

    4 Crore+

    Salaries

    1 Cr+

    Users/Month

    Contribute to help millions
    Get AmbitionBox app

    Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

    Follow us
    • Youtube
    • Instagram
    • LinkedIn
    • Facebook
    • Twitter