Click here to Skip to main content
15,886,518 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: What's Bob celebrating today? Pin
jeron131-Jan-22 10:20
jeron131-Jan-22 10:20 
GeneralRe: What's Bob celebrating today? Pin
RedDk31-Jan-22 10:59
RedDk31-Jan-22 10:59 
GeneralRe: What's Bob celebrating today? Pin
jeron131-Jan-22 11:21
jeron131-Jan-22 11:21 
GeneralRe: What's Bob celebrating today? Pin
RedDk31-Jan-22 11:42
RedDk31-Jan-22 11:42 
GeneralRe: What's Bob celebrating today? Pin
jeron131-Jan-22 11:53
jeron131-Jan-22 11:53 
GeneralRe: What's Bob celebrating today? Pin
Jörgen Andersson31-Jan-22 22:31
professionalJörgen Andersson31-Jan-22 22:31 
GeneralRe: What's Bob celebrating today? Pin
jeron11-Feb-22 3:51
jeron11-Feb-22 3:51 
GeneralCombination coding problem Pin
mmh133331-Jan-22 6:23
mmh133331-Jan-22 6:23 
I have a coding problem that is hard to solve
Given an array of positive integers arr[900, 800, 700, 600, 500, 90, 80, 70, 60, 50, 9, 8, 7, 6, 5, 4, 3, 2, 1] anda sum 3400, find all unique combinations in the arr[] where the sum is equal to 3400. The same repeated number may be chosen from arr[] at most 5 times or thereafter x times-multiple(number), or excluded if not possible. Elements in a combination (a1, a2, …, ak) must be printed in non-descending order. (ie, a1 <= a2 <= … <= ak). 
The combinations themselves must be sorted in ascending order, i.e., the combination with smallest first element should be printed first. If there is no combination possible the print "Empty" (without quotes).

Examples: 

Input : arr[] = 2, 4, 5, 6, 8 
            x = 10
Output : [2, 2, 2, 2,2]
         [2, 4,4]
         [4, 6]
         [5,5]

the challenge in this problem is to list the numbers or exclude them for the large sum when there is small numbers like 2, 4, 5

modified 1-Feb-22 10:19am.

GeneralRe: Combination coding problem Pin
Mike Hankey31-Jan-22 6:33
mveMike Hankey31-Jan-22 6:33 
GeneralRe: Combination coding problem Pin
PIEBALDconsult31-Jan-22 6:33
mvePIEBALDconsult31-Jan-22 6:33 
GeneralRe: Combination coding problem Pin
ElectronProgrammer31-Jan-22 7:31
ElectronProgrammer31-Jan-22 7:31 
GeneralRe: Combination coding problem Pin
mmh13331-Feb-22 4:26
mmh13331-Feb-22 4:26 
GeneralRe: Combination coding problem Pin
Rick York31-Jan-22 8:01
mveRick York31-Jan-22 8:01 
GeneralRe: Combination coding problem Pin
mmh13331-Feb-22 4:23
mmh13331-Feb-22 4:23 
GeneralRe: Combination coding problem Pin
PIEBALDconsult1-Feb-22 4:56
mvePIEBALDconsult1-Feb-22 4:56 
GeneralRe: Combination coding problem Pin
Rick York31-Jan-22 8:03
mveRick York31-Jan-22 8:03 
GeneralRe: Combination coding problem Pin
MarkTJohnson1-Feb-22 2:20
professionalMarkTJohnson1-Feb-22 2:20 
GeneralRe: Combination coding problem Pin
mmh13331-Feb-22 4:40
mmh13331-Feb-22 4:40 
GeneralPile of dead mice... Pin
dandy7231-Jan-22 4:18
dandy7231-Jan-22 4:18 
GeneralRe: Pile of dead mice... Pin
OriginalGriff31-Jan-22 4:32
mveOriginalGriff31-Jan-22 4:32 
JokeRe: Pile of dead mice... Pin
Daniel Pfeffer31-Jan-22 6:07
professionalDaniel Pfeffer31-Jan-22 6:07 
GeneralRe: Pile of dead mice... Pin
ElectronProgrammer31-Jan-22 4:50
ElectronProgrammer31-Jan-22 4:50 
GeneralRe: Pile of dead mice... Pin
kmoorevs31-Jan-22 5:24
kmoorevs31-Jan-22 5:24 
PraiseRe: Pile of dead mice... Pin
fgs196331-Jan-22 5:32
fgs196331-Jan-22 5:32 
GeneralRe: Pile of dead mice... Pin
Kris Lantz31-Jan-22 6:11
professionalKris Lantz31-Jan-22 6:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.