5 ms·
My favorite algorithm has been the linked list implementation, pretty useful for implementing list on embedded platforms.
by chintanp 13y ago
My favorite algorithm has been the linked list implementation, pretty useful for implementing list on embedded platforms.
- goostavos 13y agoI've really got to force myself to learn these data structures. The circular, doubly linked list is one of my favorite structures, I oddly find myself reaching for it all the time. Which is funny, because when I first had to implement it at school, I thought I would never ever have a use for such a thing. But now, years later, I don't know what I'd do without it! I wonder what I missed out on by glossing over things like red-black trees.
- signa11 13y agowell, as long as you can 'appreciate' its effects on caches its all fine ;)
- ExpiredLink 13y ago> My favorite algorithm has been the linked list implementation, pretty useful for implementing list on embedded platforms. You can use GPL'd code for your work?
- VLM 13y agoI'm not making much sense of that comment.
- andreasvc 13y agoGP is wondering whether the original poster is allowed to use code under the GPL license by his employer. This license requires derived code to be distributed under the same license, which companies may not want to do because trade secrets etc.
- kaoD 13y agoGP meant to ask: how is that relevant?
- VLM 13y agoGoogle for "BSD linked list" and get 293000 results. Its an old data structure, much older than the GPL. Also its very popular. Google for "ruby linked list gem" and simply use a debugged library. Or any other language of your choice. Being a very popular data structure there likely exist implementations under most licenses for most languages. So it just struck me as weird that in 2013 someone would cut-n-paste reimplement one found in the kernel other than for obvious academic or educational interest or direct interface with the kernel (device driver author?)
- octo_t 13y agoI'm guessing you mean "can't use GPL'd code" here. embedded work is different, in that you often embed your container in your data-structure, so you end up with something like: typedef struct { int x; int y; Point *next; } Point; this allows you to save on overhead of extra allocations when creating your list (but does mean you need to create extra functions for Point* find_list(Point* p, int x, int y);
- eps 13y agoThat's not what he meant. He meant that GP is so dumb that he is forced to use Linux .h in his project (along with all arch dependencies) rather than to take 5 minutes and code it from scratch. And that he is ignorant of licensing matters of GPL'd code or, more likely, he just doesn't give a f_ck about them. That'd be the gist of what ExpiredLink meant.