Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LRUCache ¶
type LRUCache struct {
// contains filtered or unexported fields
}
func Constructor ¶
type Twitter ¶
type Twitter struct {
// contains filtered or unexported fields
}
Twitter represents the Twitter service.
func TwitterConstructor ¶
func TwitterConstructor() Twitter
Constructor initializes a new Twitter instance.
func (*Twitter) GetNewsFeed ¶
GetNewsFeed returns the 10 most recent tweetIds in the user's news feed.
type TwitterMaxHeap ¶
type TwitterMaxHeap []Tweet
TwitterMaxHeap is a priority queue (max heap) for storing tweets by timestamp.
func (TwitterMaxHeap) Len ¶
func (h TwitterMaxHeap) Len() int
func (TwitterMaxHeap) Less ¶
func (h TwitterMaxHeap) Less(i, j int) bool
func (*TwitterMaxHeap) Pop ¶
func (h *TwitterMaxHeap) Pop() interface{}
func (*TwitterMaxHeap) Push ¶
func (h *TwitterMaxHeap) Push(x interface{})
func (TwitterMaxHeap) Swap ¶
func (h TwitterMaxHeap) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.