Add office photos
Employer?
Claim Account for FREE

Facebook

4.3
based on 161 Reviews
Video summary
Filter interviews by

StoreKing Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Base 58 Conversion Problem Statement

You are given a decimal number 'N'. Your task is to convert this number into a base 58 representation.

The Base58 alphabet is defined by the following characters: “123456789...read more

Ans.

Convert a decimal number to base 58 using a specific alphabet.

  • Iterate through each test case and convert the decimal number to base 58 using the given alphabet.

  • Handle the conversion by dividing the number by 58 and taking the remainder to find the corresponding base 58 character.

  • Build the base 58 representation by appending the characters in reverse order.

  • Output the final base 58 representation for each test case.

Add your answer

Q2. Bird and Maximum Fruit-Gathering Problem Statement

A ninja bird can gather fruits from trees arranged in a circle. Each tree has an associated fruit value. The bird can gather all the fruits from a tree in 0.5 ...read more

Ans.

The task is to find the maximum number of fruits a bird can gather within a given time frame, moving between adjacent trees.

  • Start from each tree and calculate the maximum fruits that can be gathered within the time frame.

  • Use a sliding window approach to keep track of the fruits collected while moving between trees.

  • Choose the starting tree that gives the maximum total fruits collected.

  • Example: For input N=7, M=3, ARR={2, 1, 3, 5, 0, 1, 4}, the output is 9 by starting from tree...read more

Add your answer

Q3. Triplets with Given Sum Problem

Given an array or list ARR consisting of N integers, your task is to identify all distinct triplets within the array that sum up to a specified number K.

Explanation:

A triplet i...read more

Ans.

The task is to find all distinct triplets in an array that sum up to a specified number.

  • Iterate through the array and use nested loops to find all possible triplets.

  • Use a set to store unique triplets and check if the sum equals the target sum.

  • Handle edge cases like duplicate elements and no valid triplets.

  • Return the triplets or -1 if no valid triplet exists.

Add your answer

Q4. Pair Sum Problem Statement

You are provided with an array ARR consisting of N distinct integers in ascending order and an integer TARGET. Your objective is to count all the distinct pairs in ARR whose sum equal...read more

Ans.

Count distinct pairs in an array whose sum equals a given target.

  • Use two pointers approach to iterate through the array and find pairs with sum equal to target.

  • Keep track of visited pairs to avoid counting duplicates.

  • Return -1 if no such pair exists with the given target.

Add your answer
Discover StoreKing interview dos and don'ts from real experiences

Q5. All Prime Numbers Less Than or Equal to N

Given a positive integer N, your task is to return all the prime numbers less than or equal to N.

Note:

1) A prime number is a number that has only two factors: 1 and t...read more
Ans.

Return all prime numbers less than or equal to a given positive integer N.

  • Iterate from 2 to N and check if each number is prime using a helper function.

  • A number is prime if it has only 2 factors: 1 and itself.

  • Optimize by checking divisibility only up to square root of the number.

Add your answer

Q6. Running Absolute Difference in Arrays

Given an array ARR consisting of 'N' non-negative integers, compute the running absolute difference of elements at even and odd index positions, respectively.

Input:

An int...read more
Ans.

Compute running absolute difference of elements at even and odd index positions in an array.

  • Iterate through the array and calculate absolute difference between elements at even and odd indices.

  • Keep track of running absolute differences for even and odd indices separately.

  • Output the final running absolute differences for even and odd indices.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Intern Interview Questions from Similar Companies

4.0
 • 66 Interview Questions
3.8
 • 21 Interview Questions
3.9
 • 17 Interview Questions
3.7
 • 12 Interview Questions
3.7
 • 10 Interview Questions
3.7
 • 10 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

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