experchange > java

chad altenburg (03-05-20, 03:53 PM)
On Wednesday, March 4, 2020 at 9:59:30 AM UTC-8, Eric Douglas wrote:
> On Wednesday, March 4, 2020 at 8:53:22 AM UTC-5, chad altenburg wrote:
> > Some of those problems aren't for beginners. Seriously. There is one section that has a series of problems related to backtracking. And the last time I checked, backtracking wasn't taught in an introductory programming class.

> They all sound like beginner problems. What section is that in?


Again, I don't think these are beginner problems. Because again, I was never taught this kind of stuff in the lower division CS classes in undergrad school. For us, the beginner problems included simple for and while loops.

And the section with the backtracking problems are...

chad altenburg (03-05-20, 05:22 PM)
On Wednesday, March 4, 2020 at 9:59:30 AM UTC-8, Eric Douglas wrote:
> On Wednesday, March 4, 2020 at 8:53:22 AM UTC-5, chad altenburg wrote:
> > Some of those problems aren't for beginners. Seriously. There is one section that has a series of problems related to backtracking. And the last time I checked, backtracking wasn't taught in an introductory programming class.

> They all sound like beginner problems. What section is that in?


Also, I'm considering adding you to my killfile because I'm getting this distinction impression that you aren't the sharpest tool in the shed. In other words, I'm getting this person that you're a human being of limited intelligence.
Eric Douglas (03-05-20, 05:48 PM)
On Thursday, March 5, 2020 at 10:23:09 AM UTC-5, C.D. Altenburg, Ph.D, wrote:
> Also, I'm considering adding you to my killfile because I'm getting this distinction impression that you aren't the sharpest tool in the shed. In other words, I'm getting this person that you're a human being of limited intelligence.


Not sure where that attack came from. Normally killfiles are for bots, spammers, and personal attacks. Perhaps I'm just not grasping what ought to be too difficult for 'beginners' (generally 2 kinds of beginners, ones who have never coded before, and ones new to a specific language) because I've been coding for decades but a little recursion doesn't sound that complicated to me. Sorry if you took offense to that but it sounds like you are the one of limited intelligence. Have you ever taken an IQ test? What was your score? Find me your hardest problem from that site, I'd be happy to help solve it.
Eric Douglas (03-05-20, 07:29 PM)
On Thursday, March 5, 2020 at 8:53:46 AM UTC-5, C.D. Altenburg, Ph.D, wrote:
> > They all sound like beginner problems. What section is that in?

> Again, I don't think these are beginner problems. Because again, I was never taught this kind of stuff in the lower division CS classes in undergrad school. For us, the beginner problems included simple for and while loops.
> And the section with the backtracking problems are...
>


For the first problem in that section, not sure why they said do it with no loops? The only obvious answer involves a loop.
public boolean groupSum(int start, int[] nums, int target) {
if (target == 0) {
return true;
}
if (start == nums.length - 1) {
return nums[start] == target;
}
for (int n = start + 1; n < nums.length; n++) {
if (groupSum(n,nums,target) || groupSum(n,nums,target-nums[start])) {
return true;
}
}
return false;
}
C.D. Altenburg, Ph.D, (03-06-20, 03:49 PM)
On Thursday, March 5, 2020 at 9:29:17 AM UTC-8, Eric Douglas wrote:
[..]
> }
> return false;
> }


That's what makes it hard. You're supposed to use no for loops. And here is the solution without a for loop

public boolean groupSum(int start, int[] nums, int target) {
// Base case: if there are no numbers left, then there is a
// solution only if target is 0.
if (start >= nums.length) return (target == 0);

// Key idea: nums[start] is chosen or it is not.
// Deal with nums[start], letting recursion
// deal with all the rest of the array.

// Recursive call trying the case that nums[start] is chosen --
// subtract it from target in the call.
if (groupSum(start + 1, nums, target - nums[start])) return true;

// Recursive call trying the case that nums[start] is not chosen.
if (groupSum(start + 1, nums, target)) return true;

// If neither of the above worked, it's not possible.
return false;
}

Dumbass.
C.D. Altenburg, Ph.D, (03-06-20, 03:50 PM)
On Thursday, March 5, 2020 at 7:49:03 AM UTC-8, Eric Douglas wrote:
> On Thursday, March 5, 2020 at 10:23:09 AM UTC-5, C.D. Altenburg, Ph.D, wrote:
> > Also, I'm considering adding you to my killfile because I'm getting this distinction impression that you aren't the sharpest tool in the shed. In other words, I'm getting this person that you're a human being of limited intelligence.

> Not sure where that attack came from. Normally killfiles are for bots, spammers, and personal attacks. Perhaps I'm just not grasping what ought to be too difficult for 'beginners' (generally 2 kinds of beginners, ones who have never coded before, and ones new to a specific language) because I've been coding for decades but a little recursion doesn't sound that complicated to me. Sorry if you took offense to that but it sounds like you are the one of limited intelligence. Have you ever taken an IQ test?


SAT is considered a more accurate measure of intelligence than an IQ
C.D. Altenburg, Ph.D, (03-06-20, 03:52 PM)
On Thursday, March 5, 2020 at 7:49:03 AM UTC-8, Eric Douglas wrote:
> On Thursday, March 5, 2020 at 10:23:09 AM UTC-5, C.D. Altenburg, Ph.D, wrote:
> > Also, I'm considering adding you to my killfile because I'm getting this distinction impression that you aren't the sharpest tool in the shed. In other words, I'm getting this person that you're a human being of limited intelligence.

> Not sure where that attack came from. Normally killfiles are for bots, spammers, and personal attacks. Perhaps I'm just not grasping what ought to be too difficult for 'beginners' (generally 2 kinds of beginners, ones who have never coded before, and ones new to a specific language) because I've been coding for decades but a little recursion doesn't sound that complicated to me. Sorry if you took offense to that but it sounds like you are the one of limited intelligence. Have you ever taken an IQ test? What was your score? Find me your hardest problem from that site, I'd be happy to helpsolve it.


Well, if you ever tried to apply to the ivy league schools like Harvard or Princeton, you would have realized that SAT scores are a more accurate measure of intelligence. And the fact that you think that an IQ test is an accurate measurement only reinforces my notion that you don't appear to be thatbright.
Eric Douglas (03-06-20, 05:00 PM)
On Friday, March 6, 2020 at 8:49:23 AM UTC-5, C.D. Altenburg, Ph.D, wrote:
> That's what makes it hard. You're supposed to use no for loops. And here is the solution without a for loop It does say no loops are needed. It does not say no loops are allowed. Itdid mark my guess as all correct. If a loop is not allowed they should clarify the instructions and fix the answer key.


Is this site trying to train people to write working code, or to spend extra time coming up with code that specifically tries to not use available basic language functionality? Forcing someone to write a method without a loop when a working readable solution can be found faster with one is more a puzzle site, less a training site. I don't mind a good puzzle myself but this has no practical application. Good luck to you if you intend to get a job in coding and this is your approach to actual work.

> Dumbass.


Name calling is a sign of low intelligence.
Which ivy league school did you graduate from?
I don't know what kind of high income job requires an expensive ivy league education. The best jobs near me certainly do not.
Daniele Futtorovic (03-06-20, 06:47 PM)
On 2020-03-06 14:49, C.D. Altenburg, Ph.D, wrote:
[..]
> // If neither of the above worked, it's not possible.
> return false;
> }


Pretty.

> Dumbass.


Ugly.
Eric Douglas (03-06-20, 07:03 PM)
On Friday, March 6, 2020 at 8:49:23 AM UTC-5, C.D. Altenburg, Ph.D, wrote:
[..]
> // If neither of the above worked, it's not possible.
> return false;
> }


So the next one was even easier. Some of these take a bit more thought but not genius level puzzles.

public boolean groupSum6(int start, int[] nums, int target) {
if (nums.length == 0) { return target == 0;}
if (start == nums.length - 1) { return (target == nums[start] || (target == 0 && nums[start] != 6));}
if (groupSum6(start + 1,nums,target - nums[start])) {return true;}
if (nums[start] != 6 && groupSum6(start + 1,nums,target)) {return true;}
return false;
}
C.D. Altenburg, Ph.D, (03-07-20, 03:40 PM)
On Friday, March 6, 2020 at 7:01:04 AM UTC-8, Eric Douglas wrote:
> On Friday, March 6, 2020 at 8:49:23 AM UTC-5, C.D. Altenburg, Ph.D, wrote:
> > That's what makes it hard. You're supposed to use no for loops. And here is the solution without a for loop

> It does say no loops are needed. It does not say no loops are allowed. It did mark my guess as all correct. If a loop is not allowed they should clarify the instructions and fix the answer key.
> Is this site trying to train people to write working code, or to spend extra time coming up with code that specifically tries to not use available basic language functionality? Forcing someone to write a method without a loop when a working readable solution can be found faster with one is more apuzzle site, less a training site. I don't mind a good puzzle myself but this has no practical application. Good luck to you if you intend to get ajob in coding and this is your approach to actual work.


I work as a Software Engineer for a firm in San Francisco.

> > Dumbass.

> Name calling is a sign of low intelligence.
> Which ivy league school did you graduate from?


I didn't. Just like you, I don't have what it takes to get into Harvard or Princeton.

> I don't know what kind of high income job requires an expensive ivy league education. The best jobs near me certainly do not.


Go back to Burger King
C.D. Altenburg, Ph.D, (03-07-20, 03:42 PM)
On Friday, March 6, 2020 at 8:47:37 AM UTC-8, Daniele Futtorovic wrote:
> On 2020-03-06 14:49, C.D. Altenburg, Ph.D, wrote:
> Pretty.
> Ugly.


The guy is clueless, dense, and I would NEVER consider hiring someone like that for any kind of tech job at my firm in San Francisco.

Similar Threads