Daffodil Software interview experience Real time questions & tips from candidates to crack your interview

Software Developer

Daffodil Software
upvote
share-icon
1 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 month
Topics: Data Structure, Algorithms, DBMS, OS, OOPs.
Tip
Tip

Tip 1 : Good Command over Data Structure
Tip 2 : Prepare Core Subjects
Tip 3 : Have at least 1 project

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : Single Page resume with good Projects in it.
Tip 2 : Short and Crisp resume.

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 minutes
Interview date29 Oct 2020
Coding problem2

2 Coding Question were given to be solved in 1 hr . Both questions were medium level .

1. Digits Decoding

Moderate
25m average time
70% success
0/80
Asked in companies
FacebookAdobeOYO

A few days back, Ninja encountered a string containing characters from ‘A’ to ‘Z’ which indicated a secret message. For security purposes he encoded each character of the string to its numeric value, that is, A = 1, B = 2, C = 3, till Z = 26 and combined them as a single sequence (SEQ) of digits of length N. Let's say the message was "LA", Ninja encoded it as 121 for L=12 and A=1.

Today, when he read the encoded secret message, he realised that he was not able to decode the original string. So, the Ninja is wondering in how many ways he can decode the numeric sequence to some valid string.

A valid string is a string with characters from A to Z and no other characters.

Example:
Let the encoded sequence be 121,

The first way to decode 121 is:
1 = A
2 = B
1 = A
Thus, the decoded string will be ABA.

The second way to decode 121 is:
12 = L
1 = A
Thus, the decoded string will be LA.

The third way to decode 121 is:
1 = A
21 = U
Thus, the decoded string will be AU.

So, there will be 3 ways to decode the sequence 121 i.e. [(ABA), (LA), (AU)].
Note:
The input sequence will always have at least 1 possible way to decode.    

As the answer can be large, return your answer modulo 10^9  + 7.
Follow Up:
Can you solve this using constant extra space?
Problem approach

Simply try building a recursive solution first and then change it to iterative one.
This problem is recursive and can be broken into sub-problems. We start from the end of the given digit sequence. We initialize the total count of decodings as 0. We recur for two subproblems.
1) If the last digit is non-zero, recur for remaining (n-1) digits and add the result to the total count.
2) If the last two digits form a valid character (or smaller than 27), recur for remaining (n-2) digits and add the result to the total count.

Try solving now

2. Distribute N candies among K people

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

Sanyam has ‘N’ candies, he wants to distribute that into ‘K’ of his friends. He made his ‘K’ friends stand in line, in increasing order of his likeness. Not being so smart he gives 1 candy to the first friend, 2 to the second person, and so on till the kth person. In the next turn, the first person gets ‘K + 1’ candies, the second person gets ‘K + 2’ candies, and so on.

While distributing the candies, if at a turn, the number of candies to be given to a friend is less than the required candies, then that friend gets all the remaining candies and Sanyam stops the distribution.

Your task is to find the total number of candies every person has at the end.

Problem approach

A naive approach is to iterate for every turn and distribute candies accordingly till candies are finished. Here Naive solution was also accepted.

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

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
Software Developer
2 rounds | 3 problems
Interviewed by Daffodil Software
1430 views
0 comments
0 upvotes
company logo
Software Developer
2 rounds | 4 problems
Interviewed by Daffodil Software
1606 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Daffodil Software
906 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 8 problems
Interviewed by Daffodil Software
993 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Developer
3 rounds | 3 problems
Interviewed by HCL Technologies
3393 views
1 comments
0 upvotes
company logo
Software Developer
3 rounds | 6 problems
Interviewed by Arcesium
1683 views
0 comments
0 upvotes
company logo
Software Developer
3 rounds | 5 problems
Interviewed by HCL Technologies
4079 views
0 comments
0 upvotes