Java
                                
                                 Java copied to clipboard
                                
                                    Java copied to clipboard
                            
                            
                            
                        LFUCache unexpected result
Description
https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/datastructures/caches/LFUCache.java
function:   private void addNodeWithUpdatedFrequency(Node node)
line 104
I think 104 code line:
node.previous = temp.previous;
need change:
temp.previous = node;
Steps to reproduce
No response
Excepted behavior
result ok!
Screenshots
No response
Additional context
No response
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Thanks for reporting, could you create a PR with the proposed change?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Fixed