Signify Coding Questions and Answers

Signify Coding Questions with Solutions

Here, in Signify Coding Questions and Answers page we have given Sample Signify Coding Questions with Solutions that will help you for preparing for Signify Recruitment Drive. Go through this page to get all Sample Signify Coding Questions and at last get FAQ’s related to Signify Recruitment Drive.

signify-coding-questions

Signify Coding Questions and Answers - Set 1

Question 1: EMI Options

Problem Description

Question – : There are two banks – Bank A and Bank B. Their interest rates vary. You have received offers from both banks in terms of the annual rate of interest, tenure, and variations of the rate of interest over the entire tenure.You have to choose the offer which costs you least interest and reject the other. Do the computation and make a wise choice.

The loan repayment happens at a monthly frequency and Equated Monthly Installment (EMI) is calculated using the formula given below :

EMI = loanAmount * monthlyInterestRate / ( 1 – 1 / (1 + monthlyInterestRate)^(numberOfYears * 12))

Constraints:

  • 1 <= P <= 1000000
  • 1 <=T <= 50
  • 1<= N1 <= 30
  • 1<= N2 <= 30

 

Input Format:

  • First line: P principal (Loan Amount)
  • Second line: T Total Tenure (in years).
  • Third Line: N1 is the number of slabs of interest rates for a given period by Bank A. First slab starts from the first year and the second slab starts from the end of the first slab and so on.
  • Next N1 line will contain the interest rate and their period.
  • After N1 lines we will receive N2 viz. the number of slabs offered by the second bank.
  • Next N2 lines are the number of slabs of interest rates for a given period by Bank B. The first slab starts from the first year and the second slab starts from the end of the first slab and so on.
  • The period and rate will be delimited by single white space.

Output Format: Your decision either Bank A or Bank B.

Explanation:

  • Example 1
    • Input
    • 10000
    • 20
    • 3
    • 5 9.5
    • 10 9.6
    • 5 8.5
    • 3
    • 10 6.9
    • 5 8.5
    • 5 7.9
  • Output: Bank B
  • Example 2
    • Input
    • 500000
    • 26
    • 3
    • 13  9.5
    • 3  6.9
    • 10  5.6
    • 3
    • 14  8.5
    • 6  7.4
    • 6  9.6
  • Output: Bank A

 

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Question 2: Network Stream

Problem Statement :

A stream of n data packets arrives at a server. This server can only process packets that are exactly 2^n units long for some non-negative integer value of n (0<=n).
All packets are repackaged in order to the 1 largest possible value of 2^n units. The remaining portion of the packet is added to the next arriving packet before it is repackaged. Find the size of the largest repackaged packet in the given stream.

Example arriving Packets = [12, 25, 10, 7, 8]
The first packet has 12 units. The maximum value of 2^n that can be made has 2^n = 2^3 = 8 units because the next size up is 2^n = 2^4 = 16 (16 is greater than 12).

12 – 8 = 4 units are added to the next packet. There are 4 + 25 = 29 units to repackage, 2^n = 2^4 = 16 is the new size leaving 9 units (29-16 = 9)

Next packet is 9 + 10 = 29 unists & the maximum units(in 2^n) is 16 leaving 3 units.
3 + 7 = 10 , the max units is 8 Leaving 2 units, and so on.
The maximum repackaged size is 16 units.

Returns:
Long : the size of the largest packet that is streamed

Constraints :
1<=n<=10^5
1<=arriving Packets[i] size<=10^9

Sample case 0 :

Sample input 0:
5 → number of packets=5
13→ size of packets=[13,25,12,2,8]
25
10
2
8
Sample output 0:
16

Question 3: Minimum steps needed to cover a sequence of points on an infinite grid

The task is to determine the minimum number of steps required to cover a sequence of points on an infinite grid. The infinite grid extends indefinitely in all directions, and each point in the sequence represents a coordinate on the grid.

  • For example
    • Input: points[] = [(1, 1), (2, 2), (2, 3)]
    • Output: 2
    • Explanation:
      From (1, 1) to (2, 2):The x-coordinate increases by 1, and the y-coordinate increases by 1.
      Therefore, we need to take 1 step diagonally to reach the next point.
      Total steps required: 1 step.From (2, 2) to (2, 3):The x-coordinate remains the same, and the y-coordinate increases by 1.
      Therefore, we need to take 1 step vertically to reach the next point.
      Total steps required: 1 step.The total steps required to cover the sequence of points [(1, 1), (2, 2), (2, 3)] on the infinite grid, considering all eight directions of movement, is 1 + 1 = 2 steps.

Input Format: Given sequence of cell positions.

Output Format: Print minimum no. of steps needed to cover a sequence of points.

Question 4: Queries for Count

The task is to determine the number of elements within a specified range in an unsorted array. Given an array of size n, the goal is to count the elements that fall between two given values, i and j, inclusively.
Examples:

Input:
Array: [1, 3, 3, 9, 10, 4]
Range 1: i = 1, j = 4
Range 2: i = 9, j = 12

Output:
For Range 1: 4
For Range 2: 2

Explanation:
In the first query, the numbers within the range 1 to 4 are 1, 3, 3, and 4.
In the second query, the numbers within the range 9 to 12 are 9 and 10.

Question 5: Match Substring After Replacement

Given two strings, s, and sub, along with a 2D character array mappings, we want to determine if it is possible to make the sub a substring of s by replacing characters according to the provided mappings. Each mapping consists of a pair [oldi, newi], indicating that we can replace the character oldi in sub with newi.
The replacement can be performed any number of times, but each character in sub can be replaced at most once.
We need to return true if it is possible to create sub as a substring of s using the given replacements, and false otherwise.

Example 1:

Input:
s = “fool3e7bar”
sub = “leet”
mappings = [[“e”,”3″],[“t”,”7″],[“t”,”8″]]
Output: True

Explanation:
We replace the first occurrence of ‘e’ in sub with ‘3’ and ‘t’ in sub with ‘7’, resulting in sub becoming “l3e7”. Now, “l3e7” is a substring of s, so we return true.

Example 2:
Input:
s = “fooleetbar”

sub = “f00l”
mappings = [[“o”,”0″]]
Output: False

Explanation:
The string “f00l” is not a substring of s, and no replacements can be made to create it. Additionally, we cannot replace ‘0’ with ‘o’, so it is not possible to create sub from s. Hence, we return false.

Example 3:
Input:
s = “Fool33tbaR”
sub = “leetd”
mappings = [[“e”,”3″],[“t”,”7″],[“t”,”8″],[“d”,”b”],[“p”,”b”]]
Output: True

Explanation:
We replace the first and second occurrences of ‘e’ in sub with ‘3’ and ‘d’ in sub with ‘b’, respectively. This transforms sub into “l33tb”, which is a substring of s. Therefore, we return true.

Constraints:
1 <= sub.length <= s.length <= 5000

0 <= mappings.length <= 1000
mappings[i].length == 2
oldi != newi
Both s and sub consist of uppercase and lowercase English letters and digits.
oldi and newi are either uppercase or lowercase English letters or digits.

Signify Coding Questions and Answers - Set 2

Question 6: Find the homeless 

Problem Statement -:  There are N Homeless people in the community and N houses in the community. It will be given in the array (people), the height of the person, and in the array house capacity of the house is given.

The government decided to give homes to people on the basis of the following conditions:

  • Priority is given to the people from left to right of the array
  • Each person is allotted to a house if and only if the capacity of the house is greater than or equal to the person’s height
  • Nearby empty Houses are allotted to the person( starting from the extreme left)

You need to find the number of homeless people who have not been allotted any home if the government follows the above conditions. So that government will have an idea of how many people they need to allot homes for next time.

Constraints:

  • 1 <= N <= 10^3
  • 1 <= people[i] <= 10^5
  • 1 <= house[i] <= 10^5

Input Format for Custom Testing:

  • The first line contains an integer, N, denoting the number of  people and number of houses.
  • Each line i of the N subsequent lines (where 0 <= i <= N) contains an integer describing peoplei.
  • Each line i of the N subsequent lines (where 0 <= i <= N) contains an integer describing housei.

Sample Test Cases

  • Sample Input 1
    3  
    4
    2
    7
    3
    5
    10
  • Sample Output 1
    0
  • Explanation
    people=[4,2,7]
    house=[3,5,10]
    People[0] has more priority , from left to right order in houses 5 is the nearest one which fits for people[0]
    people[1]=2 will fit in 3 which is nearer from left
    people[2]=7 will fit in remaining house of capacity of 10
    So no homeless people left so return 0 
  • Sample Input 2
    3
    3
    8
    5
    1
    9
    4
  • Sample Output 2
    2
  • Explanation
    people=[3,8,5]
    house=[1,9,4]
    people[0]=3 can fit in 9 which is nearest from left in array house
    people[1]=8  cannot fit in any home which is left (i.e, 1 and 4)
    people[2]=5 cannot fit in any home which is left (i.e, 1 and 4)
    So return 2,which is number of homeless people

Question 7 : kth Largest factor of N

Problem Description

Question -: A positive integer d is said to be a factor of another positive integer N if when N is divided by d, the remainder obtained is zero. For example, for number 12, there are 6 factors 1, 2, 3, 4, 6, 12. Every positive integer k has at least two factors, 1 and the number k itself.Given two positive integers N and k, write a program to print the kth largest factor of N.

Input Format: The input is a comma-separated list of positive integer pairs (N, k).

Output Format: The kth highest factor of N. If N does not have k factors, the output should be 1.

Constraints:

  • 1<N<10000000000
  • 1<k<600.

You can assume that N will have no prime factors which are larger than 13.

Example 1

  • Input: 12,3
  • Output: 4

Explanation: N is 12, k is 3. The factors of 12 are (1,2,3,4,6,12). The highest factor is 12 and the third largest factor is 4. The output must be 4.

Example 2

  • Input: 30,9
  • Output: 1

Explanation: N is 30, k is 9. The factors of 30 are (1,2,3,5,6,10,15,30). There are only 8 factors. As k is more than the number of factors, the output is 1.

Question 8 : Array Subarray

Problem Statement  :
You are given an array, You have to choose a contiguous subarray of length ‘k’, and find the minimum of that segment, return the maximum of those minimums.
Sample input :
1 → Length of segment x =1
5 → size of space n = 5
1 → space = [ 1,2,3,1,2]
2
3
1
2

Sample output :
3
Explanation :
The subarrays of size x = 1 are [1],[2],[3],[1], and [2],Because each subarray only contains 1 element, each value is minimal with respect to the subarray it is in. The maximum of these values is 3. Therefore, the answer is 3

Question 9: Nearest smaller Tower

Given an array representing the heights of towers, the task is to find, for each tower, the index of the nearest tower that is shorter than it.
The search for a shorter tower can be performed by looking to the left and right sides of each tower.

The following rules apply:

If there are two or more smaller towers at the same distance from the current tower, choose the tower with the smallest height.
If two towers have the same height, choose the one with the smaller index.
Example 1:

Input : Array: [1, 3, 2]
Output : Indexes: [-1, 0, 0]
Explanation:
For the tower at index 0, there is no tower shorter than it, so the output is -1.

For the tower at index 1 (height 3), there are two towers (heights 1 and 2) at the same distance. Following the rules, we choose the tower with the smallest height, which is at index 0.
For the tower at index 2 (height 2), the only tower shorter than it is at index 0.
Therefore, the final output is the array of indexes: [-1, 0, 0].

Example 2:

Input : Array : [4, 8, 3, 5, 3]
Output : Indexes: [2, 2, -1, 2, -1]
Explanation:

For the tower at index 0 (height 4), the nearest tower shorter than it is at index 2.
For the tower at index 1 (height 8), there are two towers (heights 4 and 3) at the same distance.
Following the rules, we choose the tower at index 2.
For the tower at index 2 (height 3), there is no tower shorter than it.
For the tower at index 3 (height 5), there are two towers (heights 3 and 3) at the same distance.
Following the rules, we choose the tower at index 2 because it has a smaller index.
For the tower at index 4 (height 3), there is no tower shorter than it.
Therefore, the final output is the array of indexes: [2, 2, -1, 2, -1].

Question 10 :Class Monitor

Problem Statement  :

After JEE Mains, some students got admission into an engineering college. Now there is a class consisting of such n students, and the HOD came to say it is time to select the class monitor. But He never gets all of them at one time. So he brought a register, every time he gets someone with less rank than the previous time he cut the name and wrote the name of the student and the rank.

For a given number of ranks he gets each time, you have to predict how many names are cut in the list.

Constraints:

  • Number of Visiting<=10^9
  • ranks <=10000

Input Format:

  • Number of Visiting N in their first line
  • N space separated ranks the HOD gets each time

Output Format:

Number of ranks cut in the list

Sample Input:

  • 6
  • 4 3 7 2 6 1

Sample Output:

  • 3

FAQs related to Signify Coding Questions and Answers

Question 1: What does the company Signify do?

Signify, previously recognized as Philips Lighting N.V., emerged in 2016 following the subsidiary of Philips’ lighting division through an initial public offering (I.P.O.).

This Dutch multinational corporation specializes in the production of electric lights, lighting fixtures, and control systems delivering to consumers, professionals, and the Internet of Things (IoT).

Notably, in 2018, Philips Lighting rebranded itself as Signify, while continuing to manufacture lighting products under the Philips brand.

Question 2: Does Signify includes Coding Questions in their Online Assessments and Technical Interview?

Yes, Signify includes Coding Questions in their Online Assessments and Technical Interview in their Recruitment Drive for hiring freshers.

Question 3: What is the Eligibility Criteria for Signify Recruitment Process for Freshers ?
  • MTech and Integrated (B.Tech + M.Tech ) CSE-ECE students of the 2024 batch.
  • Minimum 7 CGPA or Equivalent Percentage is required for applying.
  • No active backlogs.
Question 4: What are the Job Roles offered by Signify ?

Here are the following Job Roles Offered by Signify:

  • Development Engineer Intern
  • Tester
  • Analyst
  • Cloud and Embedded Engineer
Question 5: What is the selection proces of Signify ?

The Signify Recruitment Process includes:

  • Online Assessments
  • Technical Interviews
  • HR Interviews
Question 6: What is the Salary offered by Signify?
  • During Intership: ₹ 35,000 per month.
  • Post Completion: ₹ 12.65 LPA + 2 Lakhs of joining bonus (post successful completion of internship).

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription