Message from @Yajat

Discord ID: 543640822302638093


2019-02-09 03:50:54 UTC  

anyone here got the divison 2 beta

2019-02-09 03:50:57 UTC  

??

2019-02-09 03:51:05 UTC  

Right guys I am going to watch the only normie show I still watch

2019-02-09 03:51:08 UTC  

catch you laters

2019-02-09 03:51:12 UTC  

Later?

2019-02-09 03:51:23 UTC  

the simpsons?

2019-02-09 03:51:27 UTC  

l8r m8

2019-02-09 03:51:49 UTC  

guys what if you had one chance

2019-02-09 03:51:54 UTC  

I am watching "Goldrush" it is basically ice road truckers but with gold miners

2019-02-09 03:52:01 UTC  

one moment in time to get what you wanted

2019-02-09 03:52:08 UTC  

@Yajat i'd throw up mom's spaghetti

2019-02-09 03:52:08 UTC  

GR is a descent show.

2019-02-09 03:52:13 UTC  

Oh okay I guess

2019-02-09 03:52:18 UTC  

would you convert adp to ATP by adding a phosphate?

2019-02-09 03:52:30 UTC  

i'd tap that, sure

2019-02-09 03:52:41 UTC  

It’s more of a process than that

2019-02-09 03:52:51 UTC  

yes no duh sherlock

2019-02-09 03:53:49 UTC  

```c
void* rl(struct node *root)
{
struct Node *p, *n, *c = root;
while (c)
{
n = c->next;
c->next = p;
p = c;
c = n;
}
return p;
}
```

2019-02-09 03:53:59 UTC  

Is it true?

2019-02-09 03:54:04 UTC  

I'm just going to admit my ignorance. Last time someone posted something cryptic and I googled it, I was not happy that I did. 😀

2019-02-09 03:54:32 UTC  

why not

2019-02-09 03:54:41 UTC  

mitochondria is the powerhouse of the cell

2019-02-09 03:55:49 UTC  

There. That should be the shortest code possible.

2019-02-09 03:56:16 UTC  

Boundary conditions covered, too, if you pass null, you get null back.

2019-02-09 03:56:25 UTC  

Won't work for loops.

2019-02-09 03:56:38 UTC  

O(n) no extra storage.

2019-02-09 03:58:39 UTC  

would it kill you to give real names to your variables?

2019-02-09 03:58:47 UTC  

You could make a minor change for loop detection.

2019-02-09 03:59:20 UTC  

I wasn't sure. That's why I had to change it. I was inclined to type proper names, but I also wanted it short for Discord.

2019-02-09 03:59:26 UTC  

just store visited nodes

2019-02-09 03:59:40 UTC  

even easier, have a runner go 2x as fast, still o(n)

2019-02-09 03:59:57 UTC  

Yes, that is a common approach to loop detection.

2019-02-09 04:00:16 UTC  

@Undead Mockingbird I picked up this book years ago. It's written by Brian Kernighan who wrote C with Dennis Richie. In it he takes all sorts of routines like linked lists, trees, sorts and writes them in C, C++, Java, Perl, and a few others to show the strengths and weakness and the libraries of each. It sort of changed the way I looked at programming. It helped me to think of things language independent.

2019-02-09 04:00:48 UTC  

Skiena, Steven S. The algorithm design manual: Text. Vol. 1. Springer Science & Business Media, 1998.

2019-02-09 04:01:26 UTC  

didn't he die recently?

2019-02-09 04:01:52 UTC  

Elements of Programming Interviews is as good as it gets in regards to core CS fundamentals and interviews

2019-02-09 04:01:55 UTC  

Yes, that's a good point.

2019-02-09 04:02:29 UTC  

Dennis? unfortunately. almost a decade ago i think

2019-02-09 04:02:37 UTC  

@CasualSailor You should always think of algorithms primarily in terms of the abstract entities, not in terms of the programming language.