Skip to main content

Posts

 Vector Array STL C++ Initialize Vector in C++ C++ Deque C++ List C++ Set C++ Stack C++ Queue C++ Priority Queue C++ Map C++ Multimap C++ Map C++ Bitset C++ Algorithm

Service install on window system

 If we have to install service make sure,  .interframework install already. Goto folder like:-  C:\Windows\Microsoft.NET\Framework\v2.0.50727  C:\Windows\Microsoft.NET\Framework\ v2.0.50727 (Note: version folder can be change as the version change.) Open command prompt by  writing the "cmd" in the box of file/folder location shoes Run the command : "installUtil.exe pathofexeofthe service"

SQL COMMANDS CHEAT SHEET

DDL (Data Definition Language) DDL  or Data Definition Language actually consists of the SQL commands that can be used to define the database schema. It simply deals with descriptions of the database schema and is used to create and modify the structure of database objects in the database. DDL is a set of SQL commands used to create, modify, and delete database structures but not data. These commands are normally not used by a general user, who should be accessing the database via an application. List of DDL commands:  CREATE : This command is used to create the database or its objects (like table, index, function, views, store procedure, and triggers). DROP : This command is used to delete objects from the database. ALTER :  This is used to alter the structure of the database. TRUNCATE :  This is used to remove all records from a table, including all spaces allocated for the records are removed. COMMENT : This is used to add comments to the data dictionary. RENAME :...

7 features of OOPs

The 7 features of OOPs are as follows: 1. Incapsulation 2. Abstraction 3. Inheritance 4. Polymorphism 5. Object must be used 6. Massage passing : One object can interect with another object 7. Dynamic binding The most initial 4 are the basic OOPs features that is required.

Array Data Structure

solution of JOB-A-THON

  There are two recursive call for the GCD (Greatest Common Divisor) and HCF highest common factor. using both we solve the problem.

Problem of the day ( GeekforGeek ) 11/04/2023

 

Sieve Erotosthenes program in c++

  #include <bits/stdc++.h> using namespace std ; /* this program is for finding the prime number till the given number */ void primeSieve ( long long n ) {     long long prime [ n + 1 ] = { 0 };     for ( long long i = 2 ; i <= n ; i ++ )     {         if ( prime [ i ] == 0 )         for ( long long j = i * i ; j <= n ; j += i )         {             prime [ j ] = 1 ;         }             }     for ( long long i = 2 ; i <= n ; i ++ )     {         if ( prime [ i ] == 0 )         cout << i << " " ;     }         } int main () {     long long n ;     cin >> n ;     primeSieve ( n );     return 0 ; }

Program to find the number of 1's bit in a number

#include <bits/stdc++.h> using namespace std ; // this is the program to find the number of 1's bit in a number int count1nsBit ( int n ) {     int count = 0 ;     while ( n )     {         n = n & n - 1 ;         count ++ ;     }     return count ; } int main () {     int n ;     cin >> n ;     cout << count1nsBit ( n );     return 0 ; } /* input an output tast are comments */

Matrix search

palindrome

Recusion Tailor

 #include<bits/stdc++> using namespace std; //recursion start block double e(int x,int n) {     static int p=1,f=1;. double r;     if(n==0)     return (1); else { r=e(x,n-1); p=p*x; f=f*n; } return r+p/f; } // recursion function end block // other than recursion 

Basics of Data Structure

  Basic Operations of Data Structures In the following section, we will discuss the different types of operations that we can perform to manipulate data in every data structure: Traversal:  Traversing a data structure means accessing each data element exactly once so it can be administered. For example, traversing is required while printing the names of all the employees in a department. Search:  Search is another data structure operation that means to find the location of one or more data elements that meet certain constraints. Such a data element may or may not be present in the given set of data elements. For example, we can use the search operation to find the names of all the employees who have the experience of more than 5 years. Insertion:  Insertion means inserting or adding new data elements to the collection. For example, we can use the insertion operation to add the details of a new employee the company has recently hired. Deletion:  Deletion means to...

Application of Graph

  Applications of Graphs: Graphs help us represent routes and networks in transportation, travel, and communication applications. Graphs are used to display routes in GPS. Graphs also help us represent the interconnections in social networks and other network-based applications. Graphs are utilized in mapping applications. Graphs are responsible for the representation of user preference in e-commerce applications. Graphs are also used in Utility networks in order to identify the problems posed to local or municipal corporations. Graphs also help to manage the utilization and availability of resources in an organization. Graphs are also used to make document link maps of the websites in order to display the connectivity between the pages through hyperlinks. Graphs are also used in robotic motions and neural networks.

Type of Graph

  Depending upon the position of the vertices and edges, the Graphs can be classified into different types: Null Graph:  A Graph with an empty set of edges is termed a Null Graph. Trivial Graph:  A Graph having only one vertex is termed a Trivial Graph. Simple Graph:  A Graph with neither self-loops nor multiple edges is known as a Simple Graph. Multi Graph:  A Graph is said to be Multi if it consists of multiple edges but no self-loops. Pseudo Graph:  A Graph with self-loops and multiple edges is termed a Pseudo Graph. Non-Directed Graph:  A Graph consisting of non-directed edges is known as a Non-Directed Graph. Directed Graph:  A Graph consisting of the directed edges between the vertices is known as a Directed Graph. Connected Graph:  A Graph with at least a single path between every pair of vertices is termed a Connected Graph. Disconnected Graph:  A Graph where there does not exist any path between at least one pair of vertices is ...

Application of trees

  Some Applications of Trees: Trees implement hierarchical structures in computer systems like directories and file systems. Trees are also used to implement the navigation structure of a website. We can generate code like Huffman's code using Trees. Trees are also helpful in decision-making in Gaming applications. Trees are responsible for implementing priority queues for priority-based OS scheduling functions. Trees are also responsible for parsing expressions and statements in the compilers of different programming languages. We can use Trees to store data keys for indexing for Database Management System (DBMS). Spanning Trees allows us to route decisions in Computer and Communications Networks. Trees are also used in the path-finding algorithm implemented in Artificial Intelligence (AI), Robotics, and Video Games Applications.

lldiv() , A function of library lldiv_t in c++

  lldiv() Return value The lldiv() function returns a structure of type  lldiv_t  which consists of two members:  quot  and  rem . It is defined as follows: struct lldiv_t { long long quot; long long rem; }; Example: How lldiv() function works in C++? # include <iostream> # include <cstdlib> using namespace std ; int main () { long long nume = 998102910012L L; long long deno = 415L L; lldiv_t result = lldiv(nume, deno); cout << "Quotient of " << nume << "/" << deno << " = " << result.quot << endl ; cout << "Remainder of " << nume << "/" << deno << " = " << result.rem << endl ; return 0 ; } When you run the program, the output will be: Quotient of 998102910012/415 = 2405067253 Remainder of 998102910012/415 = 17