Posts

Image
Begin React  What is React? React is a JavaScript library used for creating user interfaces, mostly web applications. Think of React as a tool that helps you build websites with small pieces (components) instead of one big lump of JavaScript and HTML.  Why Use React? (Benefits)  Reusable Components: Write once and use it everywhere.  Fast Updates: React updates only the parts that change, not the whole page. Community Help: Many developers use it, so help is easily found. Simple Project Management: With component-based architecture, everything is neatly structured. Building a React App with TypeScript   Step-by-Step 1️ . Install Node.js Download and install Node.js from:     https://nodejs.org   2️ . Build a React + TypeScript App Open your terminal (Command Prompt, PowerShell, or VS Code's terminal) and run: npm create vite@latest my-react-app -- --template react-ts -my-react-app is the directory name. You can name it whatever you like. ...

Linked List Data Structures

Image
  Linked List Previous and next pointers are the connectors that connect the nodes. In one node previous pointer become the   next node’s previous pointer. If we add node to the Linked List we can add it using the next pointer, and if we want to remove also we can remove it along with the node’s next pointer.   A linked list is a linear collection of elements, called nodes, where each node holds a reference to the next node in the sequence. Unlike arrays, linked list elements are not stored in contiguous memory locations. Instead, each node contains data and a pointer/reference to the next node. Types of Linked Lists   1. Singly Linked Lists:    In a singly linked list, each node points to the next node in the sequence. The last node points to null, indicating the end of the list. Singly linked lists are simple to implement and memory-efficient.   2. Doubly Linked Lists:     In a doubly linked list, each node has pointers to b...

Array and Array List Data Structures

Image
  Array and Array List In data structures the simplest data structure is the Array. To store the data the simplest way is that.   We should know two   main things to create a list, -         In the Array we can only use the same typed data(same of data type among all elements). -         Array should be fixed sized.        That means we should know the size of the array before creating the array, how many data elements we want to store in that.         We should give the exact size of the array.   Why we want Array List   Array should fixed sized, but array list is not like that it is not fixed one. It’s resizable. Array List change there size according to our input data, In other way we can tell that as Dynamic Array or the Dynamic Array List.     arrays and array lists are both important data...

Stack and Queue Data structures

Image
  Queue and stack   Stack Store the data as a real world stack we called this structure as the stack data structure. Stack is what store something   one another something. If we get a real world example collection of CDs are good example. Those are store in one on another. In there If we want to add another CD we have to add it to last CD’s up   and In other side if we want to remove CD from that CD collection in that case   also we do as remove from last added one to inside. So the Concept of the Queue is the FIRST IN -LAST OUT or in other way we can tell it as LAST IN -FIRST OUT. In PUSH operation we should have to give the value to the parameter, but POP is not require any value because POP removes the upper value of the stack indeedly. Those processes are shows bellow, Some key points related to stack It behaves like a real-world stack, piles of books, etc. A Stack store the limited data only. Follow some structure to insert...

Data Structures

Image
  Data Structures   When   store data in computer we use different structures those structures we called   Data Structures. Because of these data structures   we can easily handle and easily operate the contain data.   Data Structures do arrange data in suitable structure and manage those data. Data structures organizes data in   memory that consider the elements store and there relationships to each other.   They provide a way to manage and manipulate data effectively, faster access, and the operations insertion and deletion and others.   Common data structures   ·         Arrays ·         Linked lists ·         Stacks ·         Queue ·         Tree ·         Graphs   Data Structures help organ...

Java OOPC - Interface

Image
  Interface Interface is keyword use in Java .Instead of using ‘class’ keyword using ‘interface’ we can create interface. As the same way creating a class we can create interface also.   Interface is also a class, but interface is not a class it work same as a class. Difference between class and interface ,interface can not   create object because of that interface even can not create constructor, But after Java 8 we can use constructors.   We can not do multiple inheritance. means that we can not inherit   more than one super class from sub class. Using extends we can not do multiple inheritance. But using the implements we can do multiple inheritance. Implements what inheritance do using the interface. So the purpose of using the interface is do the multiple inheritance. As we know we can not create the objects to the interfaces but using the upcasting we can create objects. In here object generate side be the class indeedly,   then that cla...

Java OOPC - Abstraction

Image
  Abstraction   Abstraction is that modify class or method using the ‘ abstract ’ key word. We can keep abstract method if only the class is abstract. If class is abstract there is no any difference, it is just a class. As a normal class we can work with it, means that we can use non abstract methods and variables   or anything inside the abstract class.   Meaningless we can define using the abstraction. Meaningless is that There is not any code inside the method or we can say there is not body   inside the method. In the   example, an abstract class `Animal` has been created, featuring an abstract method `makeSound()` and a non-abstract method `eat()`.   A subclass `Dog` has been derived from the superclass `Animal`. In this subclass, the abstract method `makeSound()` is implemented, providing a specific sound for a dog.   An object `d1` of the `Dog` class is then instantiated. Through this object, we invoke the methods `m...