materialpoint 3 days ago

I thought the point of a sliding window, especially a fixed one, is to add the next element and subtract the oldest one from a running sum, to achieve O(1) running time except the start cost. This is what an efficient constant-time median filter in image processing would do, such as Perreault and Hébert's Median Filtering in Constant Time, and Weiss' Fast Median and Bilateral Filtering do.

Edit: I can't see the visualizer explaining this part.

  • neumannbd 2 days ago

    Thanks for the feedback. I can't speak to the image processing references, as I'm still learning, but I will check them out and see if they make sense in the app.

    Regarding the purpose of the sliding window, you are correct for commutative operations in fixed windows, like maintaining a sum where each operation is O(1). When you're talking about min/max, median, and other operations where adding or removing would not be constant time, as with a priority queue or heap.

    Can you elaborate on which aspects you felt are missing from the visualizer?

    • materialpoint 18 hours ago

      This reply looks like classic and corteous AI when contradicted, and proves it haven't read nor understood the references, which clearly indicate how to achieve O(1) for min, max and median, even with greater dynamic range than 8-bit, and also clearly show how lacking the visualization is.

dvdhs 3 days ago

This just looks like more AI slop, and doesn't actually visualize the useful bits of a sliding window algorithm

  • neumannbd 2 days ago

    This was definitely made with AI, as I would still be working on the UI crap otherwise. I'm laid off and all my time is job hunting and leet code. At this point if you are not working with AI to do stuff, then you are behind.

  • materialpoint 3 days ago

    I think you are right. Looking at the source code of the page there are the usual tell-tale signs of AI written code with overtly explaining comments, such as: <!-- Favicons --> <!-- Bootstrap CSS with Replit dark theme --> <!-- Custom CSS --> <!-- Bootstrap JavaScript Bundle --> <!-- Custom JavaScript -->

  • neumannbd 2 days ago

    I forgot to ask, which specifics would you like to see that are not visualized?

  • rickydroll 3 days ago

    I'm coming to think of AI slop as the same thing you would get from a lazy or incompetent programmer.