• Home
  • Archives
  HttpException
  • Home
  • Archives
  • Algorithm
  • C++
  • Raspberry Pi
  • Life Tips

Kth Largest Element in an Array

3-way partition quickselect quicksort kth smallest

Find the kth largest element in an unsorted array.

Read more   2018/9/16 posted in  Algorithm
comments

Task Scheduler

heap priority queue

Given a letter (A to Z) array representing tasks. Each task could be done in one interval. For each interval, CPU could finish one task or just be idle.

However, there is a non-negative cooling interval n that means between two same tasks, there must be at least n intervals that CPU are doing different tasks or just be idle.

You need to return the least number of intervals the CPU will take to finish all the given tasks.

Read more   2018/9/12 posted in  Algorithm
comments

Evaluate Reverse Polish Notation

stack

Evaluate the value of an arithmetic expression in Reverse Polish Notation.

Valid operators are +, -, *, /. Each operand may be an integer or another expression.

Read more   2018/9/12 posted in  Algorithm
comments

HttpException

Categories

Algorithm C++ Raspberry Pi Life Tips

Recent Posts

  • How to get 2 Passport Photos for $0.09
  • Private VPN on Raspberry Pi
  • Kth Largest Element in an Array
  • Move Semantics in Modern C++
  • Smart Pointers in Modern C++

© 2018 HttpException.com