Mahesh Parahar

Mahesh Parahar

147 Articles Published

Articles by Mahesh Parahar

Page 11 of 15

Difference between UMA and NUMA

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 11K+ Views

UMA and NUMA are two shared memory architectures used in multiprocessor systems. They differ in how processors access memory, which affects performance, bandwidth, and suitability for different applications. UMA (Uniform Memory Access) In UMA, all processors share a single memory through one memory controller. Every processor has equal access time to any memory location. UMA is simpler to design and is suitable for general-purpose and time-sharing applications. NUMA (Non-Uniform Memory Access) In NUMA, each processor has its own local memory and can also access remote memory of other processors through multiple memory controllers. Access to local ...

Read More

Differences between Difference between getc(), getchar(), getch() and getche() functions

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 1K+ Views

All of these functions are used to read a character from input and each returns an integer value. They differ in where they read from, whether they use a buffer, and whether they echo the character to the screen. getc() getc() reads a single character from any input stream (file, stdin, etc.). It uses a buffer and waits for the Enter key. Returns EOF on failure. Syntax − int getc(FILE *stream); getchar() getchar() reads a single character from standard input only. It is equivalent to calling getc(stdin). It uses a buffer and ...

Read More

Differences between Interface and class in Java

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 27K+ Views

In Java, both classes and interfaces are fundamental building blocks of object-oriented programming. A class provides a complete blueprint for objects, while an interface defines a contract of behaviors that implementing classes must follow. Class A class is a blueprint from which individual objects are created. A class can contain the following variable types − Local Variables − Defined inside methods, constructors, or blocks. They are created when the method is called and destroyed when it completes. Instance Variables − Declared within a class but outside any method. They are initialized when the class is instantiated ...

Read More

Difference between Application context and Beanfactory in Spring framework

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 4K+ Views

The Spring framework provides two IoC (Inversion of Control) containers for managing, configuring, and manipulating beans − BeanFactory and ApplicationContext. The ApplicationContext interface extends BeanFactory to provide additional enterprise-level functionality. In modern Spring versions, ApplicationContext has largely replaced BeanFactory, though BeanFactory still exists for backward compatibility. Since Spring 2.0 and above, the BeanPostProcessor extension point is used extensively. If you use BeanFactory directly, some features such as AOP proxying and transaction management will not work without extra manual configuration. BeanFactory BeanFactory is the simplest IoC container. It uses lazy loading − beans are created only when ...

Read More

Difference between lazy and eager loading in Hibernate

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 16K+ Views

Lazy and Eager are two data loading strategies used in ORM frameworks such as Hibernate and EclipseLink. These strategies determine when related entities are fetched from the database − for example, when an Employee entity has a reference to a collection of Phone entities. Lazy Loading Lazy Loading means associated data is loaded only when you explicitly access it (by calling a getter or size method). Until that point, the related data is not fetched from the database. Use Lazy Loading when − You are working with one-to-many or many-to-many collections. You are not always ...

Read More

Types of Relations

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 830 Views

A relation on a set can have various properties that classify it into different types. Understanding these types is essential for studying equivalence classes, partial orders, and other structures in discrete mathematics. Empty Relation The empty relation between sets X and Y, or on a set E, is the empty set ∅. No element is related to any other element. Full Relation The full relation (or universal relation) between sets X and Y is the entire Cartesian product X × Y. Every element in X is related to every element in Y. Identity Relation The identity relation on set X is ...

Read More

Sum of Degrees of Vertices Theorem

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 761 Views

The Sum of Degrees of Vertices Theorem (also known as the Handshaking Lemma) is a fundamental result in graph theory that relates the sum of all vertex degrees to the number of edges in a graph. The Theorem If G = (V, E) is a non-directed graph with vertices V = {V1, V2, …, Vn}, then − ∑i=1n deg(Vi) = 2|E| This is because each edge contributes exactly 2 to the total degree sum − one for each of its endpoints. Example Each edge adds 2 to total degree ...

Read More

Rooted and Binary Tree

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 6K+ Views

A rooted tree G is a connected acyclic graph with a special node called the root, from which every edge directly or indirectly originates. An ordered rooted tree is a rooted tree where the children of each internal vertex are ordered. If every internal vertex has not more than m children, it is called an m-ary tree. If every internal vertex has exactly m children, it is called a full m-ary tree. If m = 2, the rooted tree is called a binary tree. Rooted Tree (root = a) ...

Read More

Representation of Relations using Graph

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 2K+ Views

A relation can be represented visually using a directed graph (digraph). This graphical representation makes it easy to understand which elements are related and in what direction. How to Represent a Relation as a Graph The rules for converting a relation into a directed graph are − The number of vertices equals the number of elements in the set. For each ordered pair (x, y) in the relation R, draw a directed edge from vertex x to vertex y. If there is an ordered pair (x, x), draw a self-loop on vertex x. Example ...

Read More

Representation of Graphs

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 2K+ Views

There are mainly two ways to represent a graph in computer science − Adjacency Matrix − A 2D array showing connections between vertices. Adjacency List − An array of linked lists showing neighbors of each vertex. Adjacency Matrix An adjacency matrix A[V][V] is a 2D array of size V × V where V is the number of vertices. For an undirected graph, if there is an edge between Vx and Vy, then A[Vx][Vy] = 1 and A[Vy][Vx] = 1 (the matrix is symmetric). For a directed graph, if there is an edge from Vx to ...

Read More
Showing 101–110 of 147 articles
« Prev 1 9 10 11 12 13 15 Next »
Advertisements