W2D3: Homies


I started carpooling with a cohort member named Richard. He's over 30, but he looks like he's around my age. #lifeofanasian

He's a chill guy, we save a lot of gas, and we get to have some company on the drive to and back. Pretty sick.

So the past few days I've been complaining a lot about my introversion. Well, I've started dealing with my "condition" a little better. I've signed a treaty with my mind. Once I've accepted that I need to be away from people once in a while, I stopped worrying about what other people may think and continue doing my thang.


What we did today:
1. Toy problem -- A lot easier than yesterday's. I finished the problem before the hour ended.

Non-repeated Character

Given an arbitrary input string, return the first non-repeating character. For strings with all repeats, return 'sorry'

InputOutput
string:
"ABCDBIRDUP"
"A"
string:
"XXXXXXX"
"sorry"
string:
"ALAMABA"
"L"
string:
"BABA"
"sorry"

2. Lecture on N-Queens
N-Queens is a puzzle that involves an nxn chessboard and n number of queens. In any given nxn board, only n number of queens can be placed on the board so that none of the queens can eat each other. For example,

<- This is one possible configuration of a 4x4 N-Queens board. In this sprint, one of the things we have to do is to find the number of configurations on any given nxn board.

It seems like a boatload of recursion.





3. Pair programming on N-Queens sprint
I was paired with Daniel Kim -- a real Korean homie. Right off the bat I knew we were going to get along well. We were the first ones to finish implementing helper functions for the sprint.

At first impression Daniel seemed like a Korean gangster, with his baggy clothes and intimidating demeanor. When we got to the difficult part of the sprint (coming up with a recursion algorithm to solve the # of configurations of N-queens), we split up to have some time to think alone. I drew my algorithm on the whiteboard and went through all the call stacks to make sure my code was right.

I proudly went to share my code with Daniel, only to find him with most of the spec tests passed and already debugging through his code. What a BEAST. Not only that his code was concise and efficient, and I felt like I wasted all that time.


I was a little bit salty that my code didn't get any attention, but I agreed to go ahead and use his as it was admittedly much, much better.

4. Tap-out session
Kind of life group therapy sessions. We are assigned teams of 4-5 people that get together once in a while to hold hands and sing kumbaya. Honestly, I don't think it's a great use of time.

5. Town Hall

6. Video Lecture: HTML + CSS

1.20.16

No comments:

Post a Comment