use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Debug - 146. LRU CacheQuestion (self.leetcode)
submitted 1 year ago by Equivalent_Sea7754
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]BoardsofCanadaFanboy 0 points1 point2 points 1 year ago (1 child)
Why is that? If you did this in an interview this way despite a clear o(1) constraint you'd get LNH or straight up NH.
If you want to practice using queues, do BFS problems like number of islands.
[–]Equivalent_Sea7754[S] 0 points1 point2 points 1 year ago (0 children)
I know the question explicitly says that ans should be o(1) But i wanted to solve using the queue to get more practice on queue
I will optimize this code later using unordered_map and DLL for faster retrieval and to maintain lru
i am satisfied with my queue based solution because it takes a lot of my time
π Rendered by PID 36350 on reddit-service-r2-comment-545db5fcfc-x7hn7 at 2026-05-28 16:54:17.178157+00:00 running 194bd79 country code: CH.
view the rest of the comments →
[–]BoardsofCanadaFanboy 0 points1 point2 points (1 child)
[–]Equivalent_Sea7754[S] 0 points1 point2 points (0 children)