For instance, I asked ChatGPT to implement the greedy peeling algorithm for densest subgraph (a.k.a. Charikar's algorithm). The output was correct but the algorithm did not run in linear time. Then I prompted it to add the data structures for making it run in linear time and it just failed.

Comments