Skip to content

Conversation

yusuf601
Copy link
Contributor

@yusuf601 yusuf601 commented Oct 1, 2025

fix: not unlink after destroy curr on pos tail

Perubahan yang diberikan

  1. Menambahkan operator==
                bool operator==(const Iterator& others)const{
                    return node == others.node;
                }
  1. lupa unlink pada saat hapus node terakhir tail
    karena lupa unlink begin selalu menunjuk head->next
            if(curr == tail){
                head->next = nullptr;
                curr = nullptr;
                tail = head;

Checklist

Umum:
  • Saya menambah algoritma terbaru.
  • Saya menambah dokumentasi.
Contributor Requirements (Syarat Kontributor) dan Lain-Lain:
  • Saya telah menambahkan komentar kode yang memberikan penjelasan maksud dari kode yang saya buat.
  • Saya menggunakan bahasa Indonesia untuk memberikan penjelasan dari kode yang saya buat.

Environment

Saya menggunakan (I'm using):

  • OS = Linux
  • g++ = 15.2.1

Link Issues

Issues: # <!-- if don't have a issue,please do not fill this>


License

This Commit License
https://github.com/Build-X-From-Scratch/forward_list_sratch/blob/main/LICENSE

@yusuf601 yusuf601 added bug Something isn't working fix_bug labels Oct 1, 2025
@yusuf601 yusuf601 merged commit 7bf5ebf into Build-X-From-Scratch:main Oct 1, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix_bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant