#include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> // This program works well in linux // or use gcc compiler int main(int c, char **v) { /*fork is used to create a child process and make the process to sleep for given milli seconds and atlast the process with minimum sleep get printed using this we can sort the array Note: This is fun program cannot be used in productive environment Time complexity is high for big numbers */ while (--c > 1 && !fork()); sleep(c = atoi(v[c])); wait(0); return 0; }
As the name says chain of block Now what is a block? A block typically contains a cryptographic hash of the previous block, a timestamp transaction data Where it is used? It is the backbone of cryptocurrency i.e it ensure the security and integrity of data. The usage doesn't stop here well blockchain are resistant to modification of the data. so it can used in Bank Identity verification Hospital records and much more How it ensures security and integrity of data? Block added to the chain, contain the hash ( result obtained from hash algorithm such as MD5,SHA) of the previous block so changes in one block lead to mismatch. Proof of work algorithm - Adding a node in the block chain require validation whether the new block is valid or not which is done my miner if they find the valid hash they will be rewarded How to do one? The most interesting part ...
Comments
Post a Comment