File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
g0101_0200/s0146_lru_cache
g0201_0300/s0295_find_median_from_data_stream Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 54
54
(set! head new-node)
55
55
(unless tail (set! tail new-node))
56
56
(hash-set! cache key new-node))))))))
57
+
58
+ ;; Your lru-cache% object will be instantiated and called as such:
59
+ ;; (define obj (new lru-cache% [capacity capacity]))
60
+ ;; (define param_1 (send obj get key))
61
+ ;; (send obj put key value)
Original file line number Diff line number Diff line change 29
29
(if (> (heap-count max-heap) (heap-count min-heap))
30
30
(exact->inexact (heap-min max-heap))
31
31
(/ (+ (heap-min max-heap) (heap-min min-heap)) 2.0 )))))
32
+
33
+ ;; Your median-finder% object will be instantiated and called as such:
34
+ ;; (define obj (new median-finder%))
35
+ ;; (send obj add-num num)
36
+ ;; (define param_2 (send obj find-median))
You can’t perform that action at this time.
0 commit comments