Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Samsung SDS Interview Experience for Full-Time (On-Campus)

  • Difficulty Level : Hard
  • Last Updated : 23 Feb, 2021

Samsung SDS Gurgaon visited our campus on 7/01/2021 and the entire process consists of 2 rounds. 1st round was a coding round(1 coding question in 3hr) and was conducted onsite at Samsung Gurgaon on  15/01/2021 and 2nd round was a personal interview conducted virtually.

For the coding round there were some guidelines before visiting the Samsung SDS campus due to COVID’19:

Candidates were instructed to wear the masks and download the Aarogya setu app

Rapid Antibody Tests were conducted onsite and within 10-15 mins candidates with negative test results were allowed to enter inside the premises.

Reporting time was 9:00-10:00 AM, Coding assessment time 11:00 AM – 2:00 PM.



Round 1 (On-site Coding Round): It consists of 1 coding question to be done within 3hrs. There were 50 test cases out of which 20 test cases were visible and 30 were hidden.

Problem: Given an integer n, return the least number of perfect square numbers that sum to n.

A perfect square is an integer that is the square of an integer; in other words, it is the product of some integer with itself. For example, 1, 4, 9, and 16 are perfect squares while 3 and 11 are not.

Example 1: 

Input: n = 12
Output: 3
Explanation: 12 = 4 + 4 + 4.

Example 2: 

Input: n = 13
Output: 2
Explanation: 13 = 4 + 9.

Constraints:

1 <= n <= 10^4

For a similar problem refer to this(only constraints is different): https://www.geeksforgeeks.org/minimum-number-of-squares-whose-sum-equals-to-given-number-n/

Thank you.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!