Heap sortMohd ArifThe document discusses heap sort, which is a sorting algorithm that uses a heap data structure. It works in two phases: first, it transforms the input array into a max heap using the insert heap procedure; second, it repeatedly extracts the maximum element from the heap and places it at the end of the sorted array, reheapifying the remaining elements. The key steps are building the heap, processing the heap by removing the root element and allowing the heap to reorder, and doing this repeatedly until the array is fully sorted.
ACOMP_2014_submission_70David NguyenThe document proposes a method for extracting and integrating information from different websites using crowdsourcing. It involves using a DOM tree analysis and K-means clustering to identify keywords. Crowdsourcing is then used twice: first to select keywords and then to label data and generate extraction rules. An experiment on books, movies, and music websites showed the method could accurately extract data up to 98%. The method reduces the workload for individual workers and costs compared to previous methods.
Compressed js with NodeJS & GruntJSDavid NguyenThis document provides instructions for using Grunt to compress JavaScript files. It describes installing Node.js and Grunt CLI, creating a project structure and package.json file, installing Grunt plugins, configuring Gruntfile.js to first concatenate JS files and then minify them into a single compressed file, and running Grunt to perform these tasks. The Gruntfile configuration concatenates source files into a combined.js file in the defined order, then uglifies this file to minify it.
jQuery Super BasicDavid NguyenThis completely new approach to jQuery. I made a super simple tutorial about jQuery. From this you can take a syntax easier. Enjoy.
=> Please comment how you feel about this tutorial :)
Thank you very much.
Javascript native OOP - 3 layers David NguyenThe document describes the steps to set up a project using JavaScript with a 3-layer architecture on both the front-end and back-end. It involves creating an MVC project with a SQL database, installing the Dapper package, defining models and repositories to interact with the database, and implementing controllers and services on the back-end. On the front-end, it covers creating DTOs, handling AJAX calls, and implementing repositories, services, and controllers with JavaScript. It also discusses rendering data on the front-end using templates.
MVC4 – knockout.js – bootstrap – step by step – part 1David NguyenThis document provides step-by-step instructions for creating a web application using MVC4, Knockout.js, jQuery, Bootstrap, and Microsoft SQL with stored procedures. The steps include creating a new MVC4 project, adding models and controllers, connecting to a SQL database via LINQ, creating stored procedures, adding JavaScript files, implementing Knockout.js for data binding, and utilizing Bootstrap for styling and responsiveness.
ACOMP_2014_submission_70David NguyenThe document proposes a method for extracting and integrating information from different websites using crowdsourcing. It involves using a DOM tree analysis and K-means clustering to identify keywords. Crowdsourcing is then used twice: first to select keywords and then to label data and generate extraction rules. An experiment on books, movies, and music websites showed the method could accurately extract data up to 98%. The method reduces the workload for individual workers and costs compared to previous methods.
Compressed js with NodeJS & GruntJSDavid NguyenThis document provides instructions for using Grunt to compress JavaScript files. It describes installing Node.js and Grunt CLI, creating a project structure and package.json file, installing Grunt plugins, configuring Gruntfile.js to first concatenate JS files and then minify them into a single compressed file, and running Grunt to perform these tasks. The Gruntfile configuration concatenates source files into a combined.js file in the defined order, then uglifies this file to minify it.
jQuery Super BasicDavid NguyenThis completely new approach to jQuery. I made a super simple tutorial about jQuery. From this you can take a syntax easier. Enjoy.
=> Please comment how you feel about this tutorial :)
Thank you very much.
Javascript native OOP - 3 layers David NguyenThe document describes the steps to set up a project using JavaScript with a 3-layer architecture on both the front-end and back-end. It involves creating an MVC project with a SQL database, installing the Dapper package, defining models and repositories to interact with the database, and implementing controllers and services on the back-end. On the front-end, it covers creating DTOs, handling AJAX calls, and implementing repositories, services, and controllers with JavaScript. It also discusses rendering data on the front-end using templates.
MVC4 – knockout.js – bootstrap – step by step – part 1David NguyenThis document provides step-by-step instructions for creating a web application using MVC4, Knockout.js, jQuery, Bootstrap, and Microsoft SQL with stored procedures. The steps include creating a new MVC4 project, adding models and controllers, connecting to a SQL database via LINQ, creating stored procedures, adding JavaScript files, implementing Knockout.js for data binding, and utilizing Bootstrap for styling and responsiveness.
1. Nguyễn Ngọc Dũng - HCMUS
Chứng minh số nút của Heap với chiều cao là h
Theo định nghĩa thì Heap có chiều cao là h thì số node 0 =>
h – 2 sẽ có đầy đủ node.
* Tính tổng node từ tầng 0 => h - 2
+ Tầng k = 0 => 20 nút
+ Tầng k = 1 => 21 nút
+ Tầng k = 2 => 22 nút
…
+ Tầng k = h - 2 => 2h-2 nút
Snút = 20 + 21 + 22 + … + 2h-2
2*Snút = 2*(20 + 21 + 22 + … + 2h-2)
2* Snút = 21 + 22 + 23 + … 2h - 1
Ta có: u1 = 21, q = 2(Công bội)
+ Áp dụng công thức cấp số nhân, ta được:
2* Snut = u1. = 21. = 21.(2h-1 – 1)
Snut = 2h-1 – 1
Vậy tổng số node từ tầng 0 -> h-2 là:
S(0->h-2) = 2h-1 – 1 (1)
Ta có: Số node của tầng h – 1:
+ Tối thiểu (Min) sẽ có: 1 node (2)
+ Tối đa (Max) sẽ có: 2h-1 (3)
Từ (1)(2)(3): Số node tối đa và tối thiểu của Heap có
chiều cao là h:
Tối thiểu: (2h-1 – 1) + 1
Tối đa: (2h-1 – 1) + 2h-1
11-01-2013 http://ilaptrinh.wordpress.com/