You are not logged in. Please login at to post your questions!


Please give the solution of samsung hiring challenge

I am not able to solve the questions of Samsung hiring challenge. But I want to know the solution of the problem. They did not provide any editorial or to see others successful submissions. Anyone who got AC in contest please give me the solution .

I only have a copy of 2nd and 3rd question.Here it is

asked 13 Aug '18, 21:32

soumya_98's gravatar image

accept rate: 0%

edited 16 Aug '18, 20:22

Well I solved First Problem And I will explain it if u want.And I am interested In second and 3rd solution.So plzz sm1 tell me


answered 13 Aug '18, 22:08

khiljee's gravatar image

accept rate: 0%

edited 13 Aug '18, 22:10

can you please explain 1st? I was able to get 48 in that.. I will explain 2nd in a comment soon.

(13 Aug '18, 23:51) beardaspirant3★

i don't have question.can you give me question of samsung hiring challenge??


answered 13 Aug '18, 22:10

sna902055's gravatar image

accept rate: 7%

I add the question link .

(16 Aug '18, 20:23) soumya_983★

Solution of the first question:


answered 16 Aug '18, 22:01

sushilverma's gravatar image

accept rate: 0%

2nd Question.

First preprocess sum of all n$^2$ subarrays.

dp[i][j] represents max value by dividing first i elements into j subarrays. you can calculate as

dp[i][j]=max$_{k=1\ to\ i-1}$(dp[i-k][j-1]+sum[i-k+1][i]). Here sum[i][j] means sum of all elements from i to j.

There are O(n*k) dp states and each state computed in O(n) time.

Time O(n$^2$k) Space O(nk)


answered 17 Aug '18, 04:11

praveenkumar12's gravatar image

accept rate: 8%

Not clear to me. How I get maximum sum of odd times appearance number for a range of K?

(17 Aug '18, 18:40) soumya_983★

Anybody got an email for samsung onsite test? I wanted to know if that mail is the result of the online hiring challenge or something random. The center is quite far from my place, so I want to know if the trip would be worth the trouble.


answered 31 Aug '18, 14:16

sikander_nsit's gravatar image

accept rate: 0%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 13 Aug '18, 21:32

question was seen: 503 times

last updated: 31 Aug '18, 14:16