From 4b0a6a01b051a4ebfbc17661d14cb23fe4f275fb Mon Sep 17 00:00:00 2001 From: Orangerot Date: Thu, 27 Jun 2024 11:30:16 +0200 Subject: Initial commit --- kth-largest-element-in-a-stream/src/main.rs | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 kth-largest-element-in-a-stream/src/main.rs (limited to 'kth-largest-element-in-a-stream/src/main.rs') diff --git a/kth-largest-element-in-a-stream/src/main.rs b/kth-largest-element-in-a-stream/src/main.rs new file mode 100644 index 0000000..1a3d3ff --- /dev/null +++ b/kth-largest-element-in-a-stream/src/main.rs @@ -0,0 +1,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) -> 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); + */ -- cgit v1.2.3