Skip to main content

Posts

Showing posts from February, 2023

What is algorithm and uses in real life ?

The algorithm is a method to analyze a program step by step. In the process, analysis can  be a finite number of steps called algorithms. The algorithm is a set of well-defined computational procedures it takes some input numbers and gives desired output to the user. "set of procedures" called an algorithm. Sometimes algorithms are incorrect and correct  Because algorithms are made by humans it depends on human logic how they mad algorithms. solving problem algorithms can be different from it  depends on the user and how the user makes an algorithm to solve the problem because solving methods can be different. That algorithm that takes less time to solve problems is called the "efficient " algorithm. Let's understand how we use salve problem: Example 3. Find the greatest between 2 numbers. Step 1: Start Step 2: Take 2 numbers as input, say A, B. Step 3: Check if(A>B) Step 4: Then A is greater Step 5: Print A Step 6: Else Step 7: Check if(B>A ) Step 8: Then...

What are linked list used in real life

  .   The linked list  technics to store data in  computer memory  in non contiguous     memory location . every node of data have specific address for every node so    on node are connected each other .    linked list have three type based on use are in real life .    1. Singly linked list      2. Doubly linked list.    3 Circular linked list .    let's understand uses in real life all the type of linked list  :   1. Singly linked list :      Singly linked list is like train .every compartment are connected to each other .      you can think compartment is memory address where data are stored  or linked      with . every compartment have next connection compartment . here connection       is   the address of  the next compartment. so it can say compartment have        ...

Important Sql command should know .

Imp ortant Sql command  show databases; create database [db_name]; use [db_name]; drop database [db_name] create table [table_name] (col1 , col2, col3 , col4......); eg user show tables; desc [tb_name]; drop table [table_name]; alter table [old table name] rename to [new name]; truncate table [table_name]; insert into [table_name](id,name,city) values(12,'durgesh','delhi'); insert intor [table_name] values(12,'ankit','kanpur'); alter table [table_name] add col1; update [table_name] set col= value , col = value where col=value; delete from [table_name] where col=value; where: Enter password: **** Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 16 Server version: 8.0.21 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respect...

Linked list data structure

Linked list is technic to store data in memory it's provide efficiency way to store data In not contiguous memory allocation. So user can access data from the memory and implement easily data into the memory.   So the user can access the data insertion ,deletion , updation  in easy manner .   There are three of linked list    Types of linked list    Single linked list   Doubly linked list      Circular linked list :     Single linked list have only linked address of data the user can store the data from this address into the memory. The syntax will be like this:  Struct node {            Int data;          Struct node *next;          }           Doubly linked list : Doubly linked have double pointer address  First address denotes to the previous data of address .  and next pointer denote to the data ...