From 3de95acc9bbcb560337bce6ee5f122fc225bb5e1 Mon Sep 17 00:00:00 2001 From: Song Luar Date: Sun, 29 Mar 2026 21:37:14 +0800 Subject: [PATCH] Remove update method from LFUCache class Removed the update method from LFUCache implementation in Python, Java, and JavaScript. --- articles/lfu-cache.md | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/articles/lfu-cache.md b/articles/lfu-cache.md index 63babaf22..e0d5844d5 100644 --- a/articles/lfu-cache.md +++ b/articles/lfu-cache.md @@ -623,10 +623,6 @@ class LinkedList: self.pop(self.left.next.val) return res - def update(self, val): - self.pop(val) - self.pushRight(val) - class LFUCache: def __init__(self, capacity: int): @@ -720,11 +716,6 @@ class DoublyLinkedList { pop(res); return res; } - - public void update(int val) { - pop(val); - pushRight(val); - } } public class LFUCache { @@ -844,11 +835,6 @@ class LFUCache { pop(res); return res; } - - void update(int val) { - pop(val); - pushRight(val); - } }; int capacity; @@ -976,14 +962,6 @@ class LinkedList { this.pop(res); return res; } - - /** - * @param {number} val - */ - update(val) { - this.pop(val); - this.pushRight(val); - } } class LFUCache {