Binary heap representation

Binary heap representation

rethink about sorting

                        PHA+VGhlIDxlbT5iaW5hcnkgaGVhcDwvZW0+IGlzIGEgZGF0YSBzdHJ1Y3R1cmUsIGluIHdoaWNoIHRoZSBrZXlzIGFyZSBzdG9yZSBpbiBhbiBhcnJheSBzdWNoIHRoYXQgZWFjaCBrZXkgaXMgZ3VhcmFudGVlZCB0byBiZSBsYXJnZXIgdGhhbiAob3IgZXF1YWwgdG8pIHRoZSBrZXlzIGF0IHR3byBvdGhlciBzcGVjaWZpYyBwb3NpdGlvbnMuIEluIHR1cm4sIGVhY2ggb2YgdGhvc2Uga2V5cyBtdXN0IGJlIGxhcmdlciB0aGFuIChvciBlcXVhbCB0bykgdHdvIGFkZGl0aW9uYWwga2V5cywgYW5kIHNvIGZvcnRoICg8ZW0+aGVhcC1vcmRlcmVkPC9lbT4pLiBUaGlzIG9yZGVyaW5nIGlzIGVhc3kgdG8gc2VlIGlmIHdlIHZpZXcgdGhlIGtleXMgYXMgYmVpbmcgaW4gYSBiaW5hcnkgdHJlZSBzdHJ1Y3R1cmUgd2l0aCBlZGdlcyBmcm9tIGVhY2gga2V5IHRvIHRoZSB0d28ga2V5cyBrbm93biB0byBiZSBzbWFsbGVyLjwvcD4KCjxibG9ja3F1b3RlPgogIDxwPlRoZSBsYXJnZXN0IGtleSBpbiBhIGhlYXAtb3JkZXJlZCBiaW5hcnkgdHJlZSBpcyBmb3VuZCBhdCB0aGUgcm9vdC48L3A+CjwvYmxvY2txdW90ZT4KCjxoMiBpZD0iYmluYXJ5LWhlYXAtcmVwcmVzZW50YXRpb24iPkJpbmFyeSBoZWFwIHJlcHJlc2VudGF0aW9uPC9oMj4KCjxwPldlIGRyYXcgc3VjaCBhIHN0cnVjdHVyZSBieSBwbGFjaW5nIHRoZSByb290IG5vZGUgYW5kIHRoZW4gcHJvY2VlZGluZyBkb3duIHRoZSBwYWdlIGFuZCBmcm9tIGxlZnQgdG8gcmlnaHQsIGRyYXdpbmcgYW5kIGNvbm5l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lIHRha2UgdGhlIGxhcmdlc3Qga2V5IG9mZiB0aGUgdG9wIChyb290KSwgcHV0IHRoZSBpdGVtIGZvcm0gdGhlIGVuZCBvZiB0aGUgYmluYXJ5IGhlYXAgYXQgdGhlIHRvcCwgZGVjcmVtZW50IHRoZSBzaXplIG9mIHRoZSBoZWFwLCBhbmQgdGhlbiBzaW5rIGRvd24gdGhyb3VnaCB0aGUgaGVhcCB3aXRoIHRoYXQga2V5IHRvIHJlc3RvcmUgdGhlIGhlYXAgY29uZGl0aW9uLjwvcD4KPC9ibG9ja3F1b3RlPgoKPHA+PGltZyBzcmM9Ii9hc3NldHMvaW1nL3BsYWNlaG9sZGVyLnN2ZyIgYWx0PSJyZW1vdmUgdGhlIG1heGltdW0gZnJvbSBoZWFwIiBkYXRhLXNyYz0iaHR0cHM6Ly9jZG4uZnJhbmtpbmRldi5jb20vaW1hZ2UvdXBsb2FkL2ZfYXV0byxkcHJfYXV0byx3X2F1dG8vdjE2MjE3NTg1MzYvY2xkL3JlbW92ZV9tYXhfZnJvbV9oZWFwLnBuZyI+PC9wPgo=
                        
Ads by Google

林宏

Frank Lin

Hey, there! This is Frank Lin (@flinhong), one of the 1.41 billion . This 'inDev. Journal' site holds the exploration of my quirky thoughts and random adventures through life. Hope you enjoy reading and perusing my posts.

YOU MAY ALSO LIKE

Using Liquid in Jekyll - Live with Demos

Web Notes

2016.08.20

Using Liquid in Jekyll - Live with Demos

Liquid is a simple template language that Jekyll uses to process pages for your site. With Liquid you can output complex contents without additional plugins.

Setup an IKEv2 server with StrongSwan

Tutorials

2020.01.09

Setup an IKEv2 server with StrongSwan

IKEv2, or Internet Key Exchange v2, is a protocol that allows for direct IPSec tunnelling between two points. In IKEv2 implementations, IPSec provides encryption for the network traffic. IKEv2 is natively supported on some platforms (OS X 10.11+, iOS 9.1+, and Windows 10) with no additional applications necessary, and it handles client hiccups quite smoothly.

Practising closures in JavaScript

JavaScript Notes

2018.12.17

Practising closures in JavaScript

JavaScript is a very function-oriented language. As we know, functions are first class objects and can be easily assigned to variables, passed as arguments, returned from another function invocation, or stored into data structures. A function can access variable outside of it. But what happens when an outer variable changes? Does a function get the most recent value or the one that existed when the function was created? Also, what happens when a function invoked in another place - does it get access to the outer variables of the new place?