Short JS solution with explanation  (2 Heaps) + Leetcode's default Heap
Basic understanding of the problem\nAs we need a median for a set of numbers is a sorted order middle value. So for an odd-numbered set, it would be the middle 
# Basic understanding of the problem\nAs we need a median for a set of numbers is a sorted order middle value. So for an odd-numbered set, it would be the middle value:\n`1 2 3 4 5`\nin this case, it would be 3 which is Math.floor(n/2)\nFor the even-numbered set it wouldn\'t have a middle value so we would take 2 middle values and find their average:\n`1 2 3 4`  (2+3)/2=2.5\n\nThe problem is that sorting each time would take too long and we need a way to store and add our elements in such a way that they will be kept sorted. For this, we use 2 heaps and we divide our array into 2 parts one for n/2 and the other one either for n/2 or n/2+1 depending on whether the set is odd or even. For example\n\n`1 2 3 4 5` we would keep` 1 2 ` and  `3 4 5` in separate heaps and we can just return the top value of 3 4 5 which would be the median or for\n`1 2 3 4 ` we would have `1 2`  and  `3 4`  but notice that we cant use 1 and 3, that\'s why we use 1 max heap and 1 min-heap so they are sorted as \n`2 1` (max heap)  the top value will be the max\n`3 4`(min-heap) the top value will be the mean\n\n```\nclass MedianFinder {\n\t//Initilize max and min heap\n    constructor() {\n        this.minHeap = new MinPriorityQueue() //supported by leetcode\n        this.maxHeap = new MaxPriorityQueue()\n    }\n\n    addNum(num) {\n\t//add to min and pop the top for max to keep them in the order that we want\n        this.minHeap.enqueue(num);\n        this.maxHeap.enqueue(this.minHeap.dequeue().element);\n\t\t//balance them\n        if (this.minHeap.size() < this.maxHeap.size()) {\n            this.minHeap.enqueue(this.maxHeap.dequeue().element);\n        }\n\t\t//console.log(this.minHeap.toArray(), this.maxHeap.toArray()) //run this to understand better\n    }\n\n    findMedian() {\n        if (this.minHeap.size() > this.maxHeap.size()) // if one is bigger 21 and 345 example just pop from 345(min heap)\n            return this.minHeap.front().element;\n        else \n            return (this.minHeap.front().element + this.maxHeap.front().element) / 2; // 21 and 34 example, pop 1 and 3 and find average\n        \n    }\n}\n```
['Heap (Priority Queue)', 'JavaScript']