Skip to main content

Posts

Showing posts from 2021

small introduction about graphs (code in c++) what is graph and how to use it.

 the graph can nearly solve any type of complex problem where we have a relationship between data sets. 1. social networks like Facebook friends relationships etc. 2. worldwide web where each page is connected to each other. few other problems can be solved using graphs check out the below link https://jeremykun.com/tag/games-on-graphs/ https://stackoverflow.com/questions/703999/what-are-good-examples-of-problems-that-graphs-can-solve-better-than-the-alterna some really nice videos on the graph -------------------------------------------------------------------------------------------------------------------------------- https://www.youtube.com/watch?v=gXgEDyodOJU   type of graph 1.  Graph Representation part 01 - Edge List      https://www.youtube.com/watch?v=ZdY1Fp9dKzs 2.  Graph Representation part 02 - Adjacency Matrix       https://www.youtube.com/watch?v=9C2cpQZVRBA 3.  Graph Representation part 03 - Adjacency List   ...

React useReducer hook and how to use it in a small and big application

some little intro about  mutation in javascript  //befor starting object are mutable means you can change it //deep copy a object first way //1 const  objectA  =   {  a :   100 ,  b :   100   }; const  objectB  =   {   ... objectA  }; objectB . a  =   200 ; console . log ( objectB ); //2nd const  objectC  =   {   a :  objectA . a ,   b :  objectA . b }; objectC . a  =   1000 ; console . log ( objectC ); console . log ( objectA ); //another way to create deep copy nested object let  nobject  =   {   a :   10 ,   b :   20 ,   c :   {     name :   "manish" ,     age :   21    },   arr :   [ 1 ,   2 ,   3 , ...