Yearly Archives | 2013

[Tree] Some operations on a binary search tree

[qads] Binary search tree (CNPTK) is a binary tree in which each node, key lock button is greater consideration of all the nodes of the tree and left the smaller keys of all the nodes of the tree must. Here is an example of a binary search tree: The content structure elements to plant trees Add Browse tree Search Enter a node tree […]

ASCII – ASCII table

1. What is the ASCII code? ACSI (American Standard Code for Information Interchange – Ascii information USA), often pronounced ace-fiber-ki, the character and the character code based on the Latin alphabet used in modern English and other Western European languages. It is often used to display text in computers and communication equipment […]

[Algorithm – C / C ] Quick Sort – The issues

First we explore the idea of ​​the algorithm Ideas: Quicksort array divided into two lists by comparing each element of the list with a selected element is called key element. These elements less than or equal key element to be taken forward and in the first list, the larger particles are put on the rear latch […]

[Algorithm – Java] Jump infix expression to postfix – Java – converts infix to postfix

The algebraic expressions are used daily are expressed as central elements (infix). This demonstration is understandable to humans because most operators (+, -, *, /) are binary operators and their division between the two operands together. However for PC, to calculate the value of an algebraic expression of this form […]

[C / C ] Calculate the number of large

To handle a large number of us will turn to handle string. In the following code method was needed your attention str.insert(int post, int n, int ch); n times to insert the character ch in the string str at position pos; There are also 2 Other methods are : str.insert(int post, char * s); insert s (array of characters ending '') at position pos of str; str.insert(int post, string […]

[Pascal – TUT] Posts 10: Files in pascal – File Type

1 The concept of file: The file is a sequence of elements of the same type are arranged sequentially. The data files are stored in external memory under a certain name. File aggregation in it some element of data has the same structure but different array like array element number of the file is not defined. [qads] In Pascal 3 file types […]

[Pascal – TUT] – Posts 11 : Pointers in Pascal

Since posting the order a bit of confusion to all 10: Files in pascal - file type was written earlier, you see here nhé. During the work we often have to work with the long list and of course we will consider using the array immediately. However, the use of the array is not always, with the long list […]

[C / C ] Getting mouse events in C on Ubuntu – Mouse event C on Ubuntu

To capture mouse events in ubuntu we use the library X11 / Xlib.h. Install this library with the command: sudo apt-get install libx11-dev This is an illustration from the program page http://stackoverflow.com/questions/14553435/how-to-listen-for-mouse-events-in-linux However, I still do not know how to use it in graphics. We hope you share on this issue. Refer: Click in Dev-C

Tiled 2 * n

Threads: http://vn.spoj.com/problems/LATGACH/ First we consider a rectangular 2×1 there 1 placing it ranked 1 brick 2×1. At the rectangular 2×2 there 2 placing it ranked 2 1 member×2 or 2 2 members×1. At the rectangular 2xi have the following cases with f(in) the placing of the rectangle 2xi. => f(in) = f(i-1) + f(i-2) with f(1) = 1 and […]

[Pascal – TUT] Posts 7: Subroutine

1. Benefits of using subprograms(CTC) – The program has multiple segments each segment perform a certain function{ then we used to do ctc segments on} – In the program, There are sections need to go up, repeated many times in different places. To avoid having to rewrite the paragraph that people usually classified into several CTC program […]