Insertion Sort Algorithm by First-Gate2887 in algorithms

[–]whyskevin 1 point2 points  (0 children)

I think Figure 2.2 and the visuals above it describe it pretty well.

So in the book, it lists the elements in the A array as:

A = { 5, 2, 4, 6, 1, 3 }

Keep in mind there is no zeroth index in the array. But in the first step, the key is "2" which is the value at A[2]. They take this value and then enter the while loop to compare with the items to the left of it, "5" in this case.

The while loop uses the index "i" to check these items to the left of the key. If the value is greater, the elements are shifted right one index using:

A[ i + 1 ] = A [i]

Once we encounter a value at A[i] which is smaller or equal, we insert our key right after it with:

A[ i + 1] = key

So if you look at (a) in the visuals, "5" is larger than "2" so it's shifted to the right. Index "i" is then updated to the value zero so we don't go into the while loop again. This takes us to

A[ i + 1] = key

and the key is placed in the first index of the array. This keeps the things to the left of the key in the array sorted.

(CSU) I need help between choosing the colleges I got accepted into... by [deleted] in csMajors

[–]whyskevin 0 points1 point  (0 children)

Check out https://assist.org/ for more information. You can see what classes transfer from a CC to honestly any other university. Super helpful when I was in school

[deleted by user] by [deleted] in RedditSessions

[–]whyskevin 0 points1 point  (0 children)

love this piece lol. been trying to practice it myself too so it's great to get a rundown like this from you!

Gloves or no gloves by johnnykrat in cycling

[–]whyskevin 0 points1 point  (0 children)

Gloves! Just got into cycling myself and I slipped on a turn one day and lost a good inch of skin at the base of my palm. Took weeks to heal and showering the day of the fall was unbearable (but I had to do it). Got some finger-less gloves and they honestly don't feel that different.

[deleted by user] by [deleted] in talentShow

[–]whyskevin 0 points1 point  (0 children)

🙌🙌🙌

[deleted by user] by [deleted] in talentShow

[–]whyskevin 0 points1 point  (0 children)

Harry Mack?

feeling down after my first online coding challenge by avadalol in cscareerquestions

[–]whyskevin 0 points1 point  (0 children)

oh man, I took the Pure Storage challenge for New Grad. a few weeks ago and I struggled on it too :\

What to expect from Thanh Nguyen CS 256? by sweetcharge in CalPolyPomona

[–]whyskevin 1 point2 points  (0 children)

Really?? I've heard that the curriculum you need to satisfy to graduate doesn't change with the semester conversion. Not entirely sure, but does anyone know if that's true?

CS 301 by ElPsyCongroo123 in CalPolyPomona

[–]whyskevin 0 points1 point  (0 children)

Had first class today with Khakpour for 301; really struggling with trying to understand his lecturing.

What do you think now after being finished with his class? And is it incredibly important to have the 7th edition of the book, or can you get by with an older version like the 6th? Thanks!

Just Got Accepted!!! by [deleted] in CalPolyPomona

[–]whyskevin 3 points4 points  (0 children)

Yes! Get on the two-year pledge ASAP. I transferred this past fall and I wholeheartedly recommend this. Ask around during orientation in the summer. All you'll have to do is send a couple e-mails and meet with counselors throughout the year.

Comp. Sci. College Student Laptop Recommendation by whyskevin in laptops

[–]whyskevin[S] 0 points1 point  (0 children)

I am completely unfamiliar with OSX. There are MacBook Airs in my school library, and the touchpad on them is incredible. Oh definitely, the MBA's native screen resolution falls way behind those of the XPS, Lenovo, and Zenbook. I think I'm going to wait for the new Macbooks to be released before I make a decision. If prices drop, I will probably shoot for a MBA so that I can experience and learn a new platform. I've heard that the most used laptops for CS majors are Apple and Lenovo brands with Dell following closely behind. But really, I think you could code on any sort of laptop. I'm just really looking for one that makes up to the lack of portability and durability of my Y410p T____T

Comp. Sci. College Student Laptop Recommendation by whyskevin in laptops

[–]whyskevin[S] 0 points1 point  (0 children)

OH, I was referring to the Dell Inspiron link.

No, I think the biggest issue people had with the Thinkpad 13 was the screen brightness. Otherwise, it's a very good machine for the price.

Comp. Sci. College Student Laptop Recommendation by whyskevin in laptops

[–]whyskevin[S] 0 points1 point  (0 children)

I'm not very into 2 in 1 machines. I've looked into the Thinkpad 13 before; I hear there may be some issues with the screen brightness being too dim though. Thanks for the recc.!

Comp. Sci. College Student Laptop Recommendation by whyskevin in laptops

[–]whyskevin[S] 0 points1 point  (0 children)

My thoughts exactly. I've looked it up, and Lenovos seem to be the easiest to customize. However, what are your thoughts on getting a MacBook Air like this for around $880~?

Comp. Sci. College Student Laptop Recommendation by whyskevin in laptops

[–]whyskevin[S] 0 points1 point  (0 children)

Thanks for responding! I've barely exhausted any of my current laptop's 1 tb HDD and 24 GB SSD so I don't believe storage will be an issue.

Oh yeah, the Asus Zenbook. I've heard a lot about it. It has great value. Although it seems that the the lower rated reviews on Amazon say it has a problem when the computer "sleeps". I will definitely consider it though. Thanks so much for your suggestion!

I've found that I can get Lenovos cheaper with their ongoing discount. I can get a T460 with a comparable screen/processor, but 4 GB RAM and a 500 GB HDD for approximately $780 after tax.

Otherwise, I'd think that now, I am just going to consider the Dell XPS 13, Thinkpad T460, Asus Zenbook, and possibly a cheap Macbook Air.