summaryrefslogtreecommitdiff
path: root/kth-largest-element-in-a-stream/src/main.rs
blob: 1a3d3ff299df1620d69e0863e0d12ee3d13cc1e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
fn main() {
    println!("Hello, world!");
}


struct KthLargest {

}


/** 
 * `&self` means the method takes an immutable reference.
 * If you need a mutable reference, change it to `&mut self` instead.
 */
impl KthLargest {

    fn new(k: i32, nums: Vec<i32>) -> Self {
        
    }
    
    fn add(&self, val: i32) -> i32 {
        
    }
}

/**
 * Your KthLargest object will be instantiated and called as such:
 * let obj = KthLargest::new(k, nums);
 * let ret_1: i32 = obj.add(val);
 */