• 0 posts
  • 11 comments
Joined 1 year ago
Cake day: July 10th, 2025
  • skiplists are interesting data structures. The underlying mechanism is it’s a 2-dimensional probabilistic linked list with some associated height ‘h’ that enables skipping of nodes through key-value pairs. So, compared to a traditional linked list that uses a traversal method to search through all values stored. A skip list starts from the maxLevel/maxheight, determines if “next” points to a key greater than the key provided or a nullptr, and moves down to the level below it if it is. This reduces the time complexity from O(1) with a linked list to O(N) where N Is the maxLevel.

    The reason behind why its probabilistic (in this case using a pseudo random number) is because its easier to insert and remove elements, otherwise (if you went with the idealized theoretical form) you would have to reconstruct the entire data structure each and every time you want to add/remove elements.

    In my testing when adding 1,000,000 elements to a skiplist it reduced from 6s search with a linked list to less than 1s!

  • Implementing a probabilistic skiplists.

    Because standard linked lists use traversal methods instead of quick memory access like arrays it’s computationally straining to traverse through 1000000 elements. A skiplist skips nodes by adding an additional dimension to the linked and its probabilistic for adding and removing nodes where as the idealized version requires reconstructing the entire list.

  • I want to believe you, but the people at my school are abusing it a lot, to the point where i they just give an entire assignment through chatGPT and it gives them a solution.

    The only time I see where it didn’t fully work is using it for my skip list implementation. I asked a LLM to implement a skiplist with insert, delete, and get functionality. What it gave me is an implementation that traversed through the list as a standard linked list: it is unaware of the time complexity concept associated with the skiplist, and implements it as a standard O(1) linked list. It works, but it doesn’t incorporate the “skipping” of nodes. I wonder how many student are shitting in their pants when they realize that the time isn’t being reduced compared to a standard linked list.

  • No, my intention wasn’t to undermine the value of a degree. I’m saying most people priorities for getting a degree, more specifically an engineering degree, is to just have a pay check. On a more related note, there’s a lot of “engineering majors” that use artificial intelligence to code, who don’t actually enjoy the process of learning at my uni.

    So yea, at the rate of adoption and use of generative AI at my school, a pool boy can do what most of the sophomore engineers do.

  • I disagree with your first point, when I started learning c++ I wanted to make an integral approximator, an approximator that takes any function and returns the approximate value. I already knew programming through java, and I’m not entirely used to the C++ syntax. Basically what I did to do my programming project that was “fun for me” was rush through the learning process, skipping detail of classes, inheritance, polymorphism, structs, linked lists, pointers and arrays, to get to lamda functions. Eventually I did get to learn c++ formally with my programming class, most of which I don’t remember learning it during the summer. Its not that doing your own projects is bad, you just can’t be overly ambitious on it.

  • Madness. When I started using gdb in C it was lifesaver to find any runtime errors in my code. Coming from what is the shit of C compilation and runtime errors it saved what would effectively be hours of inserting printf statements to find the error.

    It depends how well a language specifies where the runtime error is occuring. I just get “segmentation fault (core dumped)” as my runtime error which could mean any for loop or iterattive sequence in my program.

  • I try to avoid it, but ever since search engines have gone to shit, it has forced me to use it for debugging code. Stack overflow, r/Cprogramming, minimal articles on the specific issue, have ceased to exist ever since AI generation. And why should it? Why would a user post an issue (for example, on stack overflow) wait for a few days to get a few responses, when they could get an instant response with AI. Search engines have gone to shit so much, that My fathers startup company has issued a premium license for chatGPT because of how dead Search engines are.

    I hate it, I wish I didn’t have to use it, and yet this is my reality.