Digital Technology Intern

filter-iconFilter interviews by

Digital Technology Intern Interview Questions and Answers

Updated 16 Sep 2021

Popular Companies

Q1. Maximize Sum from Array

Given an integer array ARR of size N, your objective is to perform a series of operations to maximize the sum of selected elements from the array. During each operation, you should:

  1. Sel...read more
Ans.

Maximize sum by selecting elements from array and removing adjacent elements.

  • Select element 'i' and remove 'i-1' and 'i+1' from array during each operation.

  • Continue until array is empty to maximize sum of selected elements.

  • Focus on maximizing sum rather than printing results.

Q2. Next Greater Number Problem Statement

Given a string S which represents a number, determine the smallest number strictly greater than the original number composed of the same digits. Each digit's frequency from...read more

Ans.

Given a number represented as a string, find the smallest number greater than the original with the same digits.

  • Iterate from right to left to find the first digit that can be swapped with a smaller digit on its right.

  • Swap this digit with the smallest digit on its right that is greater than it.

  • Sort the digits to the right of the swapped digit in ascending order to get the smallest number.

  • If no such number exists, return -1.

  • Example: For S = '56789', the output should be '56798'...read more

Digital Technology Intern Interview Questions and Answers for Freshers

illustration image

Q3. Queue Using Stack Problem Statement

Implement a queue data structure that follows the FIFO (First In First Out) property, using only instances of the stack data structure.

Note:
  • Complete predefined functions t...read more
Ans.

Implement a queue using only stack data structure with predefined functions for FIFO operations.

  • Use two stacks to simulate a queue - one for enqueue and one for dequeue operations.

  • For enQueue operation, push elements onto the enqueue stack.

  • For deQueue operation, if the dequeue stack is empty, transfer elements from enqueue stack to dequeue stack.

  • For peek operation, return the top element of the dequeue stack.

  • For isEmpty operation, check if both stacks are empty.

  • Example: enQue...read more

Q4. 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
Ans.

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 when a train departs.

  • Return the maximum number of platforms needed at any point.

  • Example: For AT = [900, 940, 950] and DT = [910, 1200, 1120], the ...read more

Are these interview questions helpful?

Q5. Boundary Traversal of a Binary Tree

Given a binary tree of integers, your task is to return the boundary nodes of the tree in Anti-Clockwise direction starting from the root node.

Input:

The first line contains...read more
Ans.

Return the boundary nodes of a binary tree in Anti-Clockwise direction starting from the root node.

  • Traverse the left boundary nodes from root to leaf nodes in a top-down manner

  • Traverse the leaf nodes from left to right

  • Traverse the right boundary nodes from leaf nodes to root in a bottom-up manner

  • Include only unique values in the boundary nodes

Q6. Find the Second Largest Element

Given an array or list of integers 'ARR', identify the second largest element in 'ARR'.

If a second largest element does not exist, return -1.

Example:

Input:
ARR = [2, 4, 5, 6, ...read more
Ans.

Find the second largest element in an array of integers. Return -1 if second largest does not exist.

  • Iterate through the array to find the largest and second largest elements.

  • Handle cases where all elements are identical by returning -1.

  • Consider edge cases like empty array or array with less than 2 elements.

Share interview questions and help millions of jobseekers 🌟

man-with-laptop
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 291 Interviews
4.2
 • 102 Interviews
4.2
 • 83 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Recently Viewed
SALARIES
LTS International
INTERVIEWS
Globant
No Interviews
SALARIES
Shanghai Tunnel Engineering
SALARIES
Bhavna Corp.
SALARIES
LTS International
SALARIES
Comviva Technology
SALARIES
Asian Aerosol
INTERVIEWS
Deqode
No Interviews
DESIGNATION
LIST OF COMPANIES
Discover companies
Find best workplace
Digital Technology Intern Interview Questions
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
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

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