Tag: data structures
Teaching Kids Programming: Videos on Data Structures and Algorithms Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a list of integers nums, return whether it represents a max heap. That is, for every i we have …
Implement a data structure LastValueMap which has the following methods: void set(int key, int value) which associates key with value. void remove(int key) which removes key and its associated …
Implement a rate limiter with the following methods: RateLimiter(int expire) constructs a new rate limiter with the given expire time. limit(int uid, int timestamp) returns whether the user should …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a singly linked list of integers node, sort the nodes by their values in ascending order. Constraints n ≤ …