Message from @Paragram Slide - AZ
Discord ID: 495345038583398403
and when you get it... and attempt to set next
the data was null, not the node itself I think
ahh ok
it must be the size then
get(this.size - 1) is returning null
```
ListNode last = get(this.size - 1);
if (last != null) {
last.next = newNode;
++this.size;
return true;
}
return false;
```
thanks
this would only happen adding first node to list I would think
what is this class?
data structures?
or Java class?
Data Structures
I actually have a Java developer certificate but it was a long time ago so I have to relearn everything
Got it same time as I graduated high school
when I took that class we used C
1999 😉
Java was its own class back then - the OOP class
I had to take a 3 part Java series to get into this class
It was part of my certificate
nice
I need help factoring a math problem @here
-x^2 + 5x + 14
(-x - 2)(x - 7)
I have meeting in 3 mins
but that is close
Have you been taught any particular methods for factoring?
Not really all I've learned is the "what adds to give us the middle term and multiplies to give us the third term
Okay, well first try writing out this (-x )(x ), think of a few number that multiply to form 14, and see which of those can be added or subtracted to form 5
In this case, 7*2 is 14, and 7-2 is 5. So, you put the 7 and the 2 in those parentheses and change the signs as needed.
Okay
(-x + 7)(x - 2) would create a negative 14, so, although that would work for the 5x, it wouldn't work for the 14. So the right answer is the one Paradigm Slide gave.
Honestly, this is largely just process of elimination, unless someone knows a better way
So before that wouldnt you write it as
-x^2+7x-2x+14? Factor out the -x, but then what happens to the x attached to the 7 and 2?
-x(-x+7)(x-2)(x+14) ?
It would be written out as -x^2-2x+7x-14
@Warren H so if you have (-x-a)(x-b) for some a,b then a*b = 14 and b-a = 5. The solution from inspection is a = 2 and b=7.
@ThisIsChris i imagined completing the square to be something different. iirc completeing the square is transforming a quadratic into the form (ax+b)^2+c
@YourFundamentalTheorum you're right my bad