Category: ব্লগ । Blog

ব্লগ । Blog

Nodes: Vertices and Edges. Nodes for them

define MaxWordSize 100

Build a Number Hash in C

Create a Hash Table to store numbers. Also, search numbers in that Hash Table. Write Code in C define _CRT_SECURE_NO_WARNINGS include include include define MaxNumbers 50 // to divide with define N 100 define Empty 0 define STORAGESIZE 100 int hashTable[STORAGESIZE + 1]; //initialize hash tablevoid initializeHashTable() { } //find a number and return found/not-foundint …

Continue reading

Build a Word Hash

Store Words in a Hash Table. Also, search a word in that Hash Table define _CRT_SECURE_NO_WARNINGS include include include //#define MaxNumbers 100 define MaxWordLen 50 define Empty 0 define STORAGESIZE 15 // to divide with define N 15 char hashTable[STORAGESIZE][MaxWordLen]; //initialize hash tablevoid initializeHashTable() {for (int counter = 0; counter < STORAGESIZE; counter++) {strcpy(hashTable[counter], “”);}} …

Continue reading

Input: Tree Traversal Data Output: Build the Tree

•From In-order Output to Build the Tree •Take In-order Traversal Output Data •And Build the Tree •Take the middle (N) or so as the root •Keep going/taking alternate left (nodeLabels) (K D) from there •Make those also roots/parents (left sub tree) •The last may be at the last left in this flow •Then from the …

Continue reading

Input: Post order Tree Traversal data, Output: Tree

• Last one (E) becomes the root • Some immediate (backward) right ones ones (L A T) up until middle (you can choose)  also becomes parents (downward right side parent) • – Then put some immediate ones (backward) ( N F ) as left  children to come to root Then take alternate (K P) to …

Continue reading

From Pre-order Tree Traversal Output to Build the Tree

From Pre-order Tree Traversal Output to Build the TreeFirst one becomes the root such as NSome immediate ones (D G) also becomes parents up until middle (you can choose) – left sub tree parens Then put some immediate ones (K P) as right children (in left subtree) to come to root Then take alternate (E …

Continue reading

Build the Tree from Tree Traversal Output

From In-order Output to Build the Tree •Take In-order Traversal Output Data •And Build the Tree •Take the middle (N) or so as the root •Keep going/taking alternate left (nodeLabels) (K D) from there •Make those also roots/parents (left sub tree) •The last may be at the last left in this flow •Then from the …

Continue reading

Oracle Dynamic SQL

Oracle Trigger

Click on the images to see them clearly Example: Ref: https://docs.oracle.com/cd/B13789_01/server.101/b10759/statements_7004.htm

Oracle Functions

Click on Image to see them clearly Example: CREATE FUNCTION get_bal(acc_no IN NUMBER) RETURN NUMBER IS acc_bal NUMBER(11,2); BEGIN SELECT order_total INTO acc_bal FROM orders WHERE customer_id = acc_no; RETURN(acc_bal); END; / Ref: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/lnpls/CREATE-FUNCTION-statement.html