Binary heap representation

Binary heap representation

rethink about sorting

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

林宏

Frank Lin

Hey, there! This is Frank Lin (@flinhong), one of the 1.4 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 templating language that Jekyll uses to process pages on your site. With Liquid you can output an modify variables, have logic statements inside your pages and loop over content.

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 tunneling 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?