8-to-1 Demultiplexer (DEMUX) in VHDL
This VHDL code implements and verifies an 8-to-1 demultiplexer (DEMUX), a combinational circuit that takes a single data input and routes it to one of...
01 – Competitive Programming Problem Solution using Array Edge Conditions in C++
This C++ program represents a typical competitive programming solution structure where multiple test cases are processed efficiently, and a simple gam...
02 – Greedy Pairing Strategy using Categorization and Matching in C++
This C++ program implements a greedy algorithm to solve a problem involving classification and optimal pairing of elements based on given constraints,...
03 – Feasibility Check using Sum Constraint and Divisibility in C++
This C++ program implements a straightforward yet effective approach to determine whether a target sum can be achieved under specific constraints, a c...
04 – Array Transformation using Targeted Segment Reversal in C++
This C++ program implements an efficient strategy to transform a permutation by performing at most one reversal operation on a carefully chosen subarr...
05 – Range Query Optimization using Suffix Maximums and Prefix Sums in C++
This C++ program implements an efficient approach to handle multiple range sum queries by combining suffix-based preprocessing with prefix sum techniq...
06 – Conditional Value Adjustment based on Threshold in C++
This C++ program implements a simple decision-based logic where an input value is conditionally modified depending on whether it crosses a predefined ...
07 – Minimum Adjustment to Achieve Divisibility under Constraints in C++
This C++ program solves a problem involving divisibility adjustment using a greedy and mathematical approach, where the goal is to make a given number...
08 – Maximum Pair Formation using Greedy Counting in C++
This C++ program demonstrates a greedy counting approach to maximize the number of valid pairs that can be formed from three different types of elemen...
09 – Sequential Unlocking Mechanism using Dependency Tracking in C++
This C++ program implements a dependency-based unlocking mechanism, where elements can only be counted or activated if certain prerequisite conditions...
0_1 Knapsack (Tabulation) Problem in C
Given n items where each item has some weight and profit associated with it and also given a bag with capacity W, [i.e., the bag can hold at most W we...
0_1 Knapsack Problem in C
Given n items where each item has some weight and profit associated with it and also given a bag with capacity W, [i.e., the bag can hold at most W we...
1-Bit ALU Design in VHDL
This VHDL implementation presents a comprehensive design of a single-bit Arithmetic Logic Unit (ALU) employing concurrent signal assignment methodolog...
10 – Cost Minimization using Comparative Evaluation in C++
This C++ program implements a simple cost comparison strategy to determine the minimum expense between two different pricing schemes, a common pattern...
11 – Parity Check using Odd Count Evaluation in C++
This C++ program implements a simple yet effective logic to determine whether a sequence of numbers satisfies a parity-based condition, specifically b...
12 – Maximizing Result using Minimum Difference Adjustment in C++
This C++ program implements an optimization strategy where the goal is to maximize a final result by subtracting the smallest possible difference betw...
13 – Counting Common Prefix Groups using Hash Mapping in C++
This C++ program focuses on identifying and counting groups of strings that share a common prefix of a given length, using an efficient hashing-based ...
14 – Feasibility Check using Multiplication Constraint in C++
This C++ program implements a straightforward feasibility check to determine whether a required quantity can be achieved given a fixed capacity per un...
15 – Non-Negative Result after Repeated Subtraction in C++
This C++ program implements a simple arithmetic logic to determine the remaining value after repeatedly subtracting a fixed quantity, ensuring that th...
2-to-4 Binary Decoder in VHDL
This VHDL code implements and tests a 2-to-4-line decoder using a structured design approach. The main module `TWO_FOUR_DECODER` takes two input bits ...
3-Bit Up-Down Counter in VHDL
Here's a complete implementation of a 3-bit synchronous up/down counter with reset and direction control: 1. Design Approach Up/Down Control: dir ...
4-to-1 Multiplexer by 3 2-to-1 Multiplexer in VHDL
This VHDL code provides a modular and hierarchical implementation of a 4-to-1 multiplexer using structural modeling by composing it from multiple 2-to...
4-to-1 Multiplexer in VHDL
This VHDL code implements a 4-to-1 multiplexer, which selects one of four input signals (`I0` to `I3`) and forwards it to the output `Y` based on the ...
8-bit Unsigned Divider Using Restoring Division Algorithm in VHDL
Explanation of the 8-bit Unsigned Divider Using Restoring Division Algorithm This VHDL design performs division between two 8-bit unsigned numbers usi...
8-to-1 Multiplexer in VHDL
This VHDL implementation represents a sophisticated 8-to-1 multiplexer design that exemplifies fundamental digital circuit principles through the use ...
Addition and Subtraction Composite Unit in VHDL
This VHDL code implements and tests a 4-bit arithmetic unit capable of performing both addition and subtraction operations using a modular design appr...
Advanced ANSI Color Utility for Java Console Applications
This comprehensive Java Color utility class provides extensive terminal colorization capabilities through ANSI escape codes, offering a rich palette o...
Array-Based Stack Implementation in C
This program demonstrates a complete stack implementation using a fixed-size array, showcasing essential LIFO (Last-In-First-Out) operations with effi...
Bash Scripting Tutorial Script
This script demonstrates core Bash features: indexed and associative arrays (printing, length, slicing, appending, key-based access); string manipulat...
Basic TCP Client-Server Communication using IPv4 Sockets in C
This program demonstrates a simple client-server communication model using TCP/IP sockets over IPv4, where a server sends a predefined message to a cl...
Bellman–Ford Algorithm in C
Like Dijkstra's algorithm, Bellman–Ford proceeds by relaxation, in which approximations to the correct distance are replaced by better ones until they...
Bellman–Ford Algorithm in JAVA
The provided Java program implements the Bellman-Ford algorithm to compute the shortest path from a single source vertex to all other vertices in a di...
Bubble Sort Script in Bash
This Bash script implements the bubble sort algorithm to arrange numbers in ascending order directly from command line input. It begins by printing th...
Bubble Sort in JAVA
Bubble sort is one of the simplest sorting algorithms that works by repeatedly comparing adjacent elements in an array and swapping them if they are i...
C Code Examples for exec() Process Replacement
This set of three C programs demonstrates the various uses of the execl() system call. The first program shows the "chain loading" pattern, where the ...
C Program Demonstrating Orphan and Zombie Process Scenarios
This C program uses the fork() system call to create a child process and illustrates the concepts of orphan and zombie processes. As written, the chil...
C Program Demonstrating Pthread Creation and Flawed Join Logic
This C program uses the POSIX threads (pthread) library to create two separate threads, s and p. Each thread immediately configures itself to be cance...
C Program Using a Binary Semaphore for Mutual Exclusion
This C program demonstrates how to use a binary semaphore to prevent a race condition. It creates two threads that both run the inc function, which in...
C Program for Producer-Consumer Problem Using Semaphores (Size 1 Buffer)
This C program implements a classic Producer-Consumer solution (also known as the Bounded Buffer problem for a buffer of size 1). It uses two semaphor...
C Program: Linux Named Pipe (FIFO) Example
This code provides a complete C language example of Inter-Process Communication (IPC) on Linux using a Named Pipe, also known as a FIFO. It consists o...
C Program: Linux Unnamed Pipe (FIFO) Example
This C program demonstrates a fundamental inter-process communication (IPC) technique using an unnamed pipe. The program first creates a pipe (a pair ...
CLI-Driven Student Grading Report Tool in JAVA
This Java program is a simple academic grading system that takes a student's name and their marks in five subjects—Operating Systems (OS), Operating S...
Circular Singly Linked List Console Manager in C
A Versatile Menu-Driven System for Insertion, Deletion, Sorting, Reversal & Traversal This interactive C program is a feature-rich implementation o...
Comparison of Two Pthread Value-Return Implementations
This code block contains two separate C programs demonstrating different ways for a thread to return a value, one of which contains a critical bug. ...
Concurrent TCP Echo Server and Client using Goroutines in Go
This program demonstrates a modern implementation of client-server communication using the Go programming language, where concurrency is handled using...
Continuous Character Exchange and Increment using UNIX Domain Sockets in C
TITLE: Continuous Character Exchange and Increment using UNIX Domain Sockets in C This program demonstrates a continuous bidirectional communicatio...
Creation of Relational Tables with Constraints in Oracle SQL
This set of SQL statements demonstrates the creation of three related tables—dept, emp, and salgrade—along with the use of various integrity constrain...
Cursor Settings Overview (settings.json)
This settings.json is a customized configuration for the Cursor editor, tailored to balance productivity, aesthetics, and smooth workflow across multi...
Day 1 – Basic SQL Queries for Selection, Arithmetic Operations, String Manipulation, and Sorting
This set of SQL queries demonstrates fundamental operations performed on the emp table, covering basic data retrieval, arithmetic calculations, string...
Day 2 – SQL Queries using Conditions, Filtering, Pattern Matching, and Logical Operators
This collection of SQL queries demonstrates the use of conditional filtering and logical operations on the emp and dept tables, building upon basic qu...
Day 3 – SQL String Functions and Text Manipulation in Oracle
This set of SQL queries focuses on string manipulation functions in Oracle SQL, demonstrating how textual data can be transformed, formatted, and anal...
Day 4 – SQL Numeric Functions and Mathematical Operations in Oracle
This set of SQL queries focuses on numeric and mathematical functions in Oracle SQL, demonstrating how numerical data can be manipulated, transformed,...
Day 5 – SQL Joins and Set Operators in Oracle
This set of SQL queries focuses on advanced data retrieval techniques using joins and set operators, which are essential for combining data from multi...
Depth First Search (or DFS) (C++)
In Depth First Search (or DFS) for a graph, we traverse all adjacent vertices one by one. When we traverse an adjacent vertex, we completely finish th...
Dijkstra Algorithm in C
Given a weighted undirected graph represented as an edge list and a source vertex src, find the shortest path distances from the source vertex to all ...
Dijkstra Algorithm in JAVA
The given Java program implements Dijkstra’s algorithm to compute the shortest path from a single source vertex to all other vertices in a weighted, n...
Double-Ended Queue (DEQueue) Simulator in C
Interactive Input/Output Restricted DEQueue with Circular Array Implementation This C program simulates a Double-Ended Queue (DEQueue) using a circ...
Doubly Linked List Manager in C
This C code implements a basic doubly linked list that supports common operations like insertion, deletion, and display. It starts by defining a Node ...
Dynamic Programming Solution for House Robber Problem (Circular Case)
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are ar...
Factorial in Bash
This script calculates the factorial of a given number using an iterative approach. When you pass a number as input, the function initializes a result...
Feature-Rich Interactive Binary Search Tree (BST) Program in C
— A Dynamic Console-Based Menu System for Building, Manipulating, and Analyzing Binary Search Trees This C program is a comprehensive and interacti...
Finding the Longest Consecutive Sequence in an Unsorted Array
This Java program determines the length of the longest consecutive sequence of integers within an unsorted array. It works by first sorting the array,...
Floyd–Warshall Algorithm in C
In computer science, the Floyd–Warshall algorithm (also known as Floyd's algorithm, the Roy–Warshall algorithm, the Roy–Floyd algorithm, or the WFI al...
Floyd–Warshall Algorithm in JAVA
The provided Java program implements the Floyd-Warshall algorithm to compute the shortest distances between all pairs of vertices in a weighted direct...
Fork System Programming in C with Fork: Example 1
This page dives into the fundamentals of process creation in C using the fork() system call, breaking down how parent and child processes are formed a...
Fractional Knapsack Problem (C++)
The basic idea of the greedy approach is to calculate the ratio profit/weight for each item and sort the item on the basis of this ratio. Then take th...
Fractional Knapsack Problem in C
The basic idea of the greedy approach is to calculate the ratio profit/weight for each item and sort the item on the basis of this ratio. Then take th...
Full Adder Using Half Adders in VHDL
This VHDL code implements a structural approach to designing a full adder circuit using two half adders, accompanied by a testbench to simulate its be...
Full subtractor Using Half subtractors in VHDL
This VHDL implementation presents a comprehensive hierarchical design approach for binary subtraction circuits, demonstrating the fundamental principl...
Graph Colouring in C++
Create a recursive function that takes the graph, current index, number of vertices, and color array. If the current index is equal to the number of ...
Hamiltonian path problem in C
The Hamiltonian path problem is a topic discussed in the fields of complexity theory and graph theory. It decides if a directed or undirected graph, G...
Heap Sort Algorithm in Java
This Java implementation of the Heap Sort algorithm demonstrates how a binary heap structure can be leveraged for efficient sorting. The process begin...
Heap Sort Implementation in C
This program demonstrates the heap sort algorithm, an efficient comparison-based sorting technique that uses a binary heap data structure. The heapify...
Hyper Terminal Configuration
The provided code is a configuration file for **Hyper Terminal**, a highly customizable terminal emulator built using web technologies like Electron, ...
Infix to Postfix Conversion and Evaluation in C
This C program takes an infix expression from the user and converts it into postfix notation using a stack-based approach. It defines a stack and uses...
Insertion Sort Script in Bash
This Bash script demonstrates how the insertion sort algorithm works directly from the command line by taking user input as an array of numbers, displ...
Insertion Sort in JAVA
Insertion sort is a simple and intuitive sorting algorithm that builds the final sorted array one element at a time by repeatedly taking the next elem...
Insertion and Updating of Data with Referential Integrity in Oracle SQL
This set of SQL statements demonstrates how data is inserted into multiple related tables and how relationships between records are established and up...
Interactive Binary Tree Construction and Traversal Program in C
Build, Traverse, and Analyze Binary Trees Using User Input This C program provides an interactive interface for constructing and traversing binary ...
Interactive Two-Way Chat System using UNIX Domain (File) Sockets in C
This program implements a real-time interactive chat system between a server and a client using UNIX domain sockets, allowing both sides to send and r...
JK Flip-Flop in VHDL
This VHDL code presents a behavioral implementation and simulation of a JK flip-flop with an enable signal. The main entity `JK_FF` accepts inputs for...
Java Array Sum Calculator
Sum Class: The Sum class provides overloaded methods to calculate the sum of arrays of different numeric types: Methods: sumArray(int... array): Acce...
Job Sequencing (C++)
Given two arrays: deadline[] and profit[], where the index of deadline[] represents a job ID, and deadline[i] denotes the deadline for that job and pr...
Job Sequencing Problem in C
Given two arrays: deadline[] and profit[], where the index of deadline[] represents a job ID, and deadline[i] denotes the deadline for that job and pr...
Kruskal’s algorithm (C++)
A minimum spanning tree (MST) or minimum weight spanning tree for a weighted, connected, and undirected graph is a spanning tree (no cycles and connec...
Kruskal’s algorithm in C
A minimum spanning tree (MST) or minimum weight spanning tree for a weighted, connected, and undirected graph is a spanning tree (no cycles and connec...
Linked List Implementation in C with Comprehensive Operations
This program provides a complete implementation of a singly linked list in C, featuring a wide range of operations including insertion at the beginnin...
Linked List Implementation in GO with Comprehensive Operations
This Go program implements a comprehensive and interactive toolkit for performing various operations on a singly linked list, covering insertion, dele...
M-Coloring Problem In C
Given an edges of graph and a number m, the your task is to find weather is possible to color the given graph with at most m colors such that no two a...
MERGE SORT (C++)
Merge sort is a sorting algorithm that follows the divide-and-conquer approach. It works by recursively dividing the input array into smaller subarray...
Matrix Chain Multiplication In C
Given a chain of matrices A1, A2, ..., An, you want to find the minimum number of scalar multiplications needed to compute the product. If A1 is of d...
Matrix Operations Console Program in C
A Dynamic Menu-Driven Application for Creating, Modifying, and Displaying Matrices. This C program is a comprehensive, menu-driven application des...
Max-Min Problem In C
The Max-Min Problem in algorithm analysis is finding the maximum and minimum value in an array. To find the maximum and minimum numbers in a given ar...
Memoized Recursive Solution for Climbing Stairs Problem
This C++ implementation solves the classic "climbing stairs" problem using dynamic programming with memoization, where we calculate the number of dist...
Merge Sort Algorithm in Java
This Java implementation of the Merge Sort algorithm provides a clear example of how divide-and-conquer can be applied to sorting. The array is recurs...
Multi-Threaded Full-Duplex Chat Application using TCP Sockets and Pthreads in C
TITLE: Multi-Threaded Full-Duplex Chat Application using TCP Sockets and Pthreads in C This program demonstrates an advanced client-server communic...
Multithreading in C with Pthreads: Example: 1
This program demonstrates the basics of multithreading in C using the POSIX pthread library, where two independent threads run concurrently with the m...
Multithreading in C with Pthreads: Example: 2
how to pass single arguments as well as multiple values using arrays and structures to threads. We build a clean example where multiple threads calcul...
MySQL Workbench Default Code Editor Configuration
This XML file is a configuration for MySQL Workbench’s code editor that defines how code looks and behaves across different languages. It specifies th...
MySQL Workbench Dracula Theme Code Editor Configuration
This XML file is a configuration for MySQL Workbench’s code editor that defines how code looks and behaves across different languages. It specifies th...
N Queen Problem in C
The idea is to use backtracking to check all possible combinations of n queens in a chessboard of order n*n. To do so, first create an auxiliary matri...
Naive Substring Search in C
This C program performs a basic substring search within a main string using a brute-force approach. It prompts the user to input a main string and the...
Prim’s Algorithm (C++)
Prim’s algorithm is a Greedy algorithm like Kruskal’s algorithm. This algorithm always starts with a single node and moves through several adjacent no...
Prim’s Algorithm in C
Prim’s algorithm is a Greedy algorithm like Kruskal’s algorithm. This algorithm always starts with a single node and moves through several adjacent no...
Process image replaces in C with exec: Exmaple
💤 First Program: sleep + exec of ps -Tl This program starts by asking the operating system: “Hey, what’s my process ID?” using getpid(). That PID ...
Queue Implementation Using Arrays in C
This program demonstrates a queue data structure implemented using a fixed-size array in C, providing essential operations such as enqueue (inserting ...
Queue Implementation Using Linked List in C
This program demonstrates a queue data structure implemented using a linked list in C, providing essential operations such as enqueue (inserting eleme...
Queue Implementation Using Linked List in GO
This Go program implements a queue data structure using a singly linked list, providing an interactive menu-driven interface for performing standard q...
Quick Sort Algorithm in Java
This Java implementation of the Quick Sort algorithm demonstrates an efficient divide-and-conquer approach to sorting arrays. By selecting the last el...
QuickSort Implementation in C
This program implements the efficient QuickSort algorithm, which sorts an array by recursively partitioning it around a pivot element (selected as the...
SR Flip-Flop in VHDL
Entity Inputs: clk: Clock signal (rising edge triggered) en: Enable (active high) S: Set input (active high) R: Reset input (active high) Outp...
Simple HTTP Web Server using TCP Sockets in C
This program implements a basic HTTP web server using TCP/IP sockets that listens on port 3000 and serves an HTML file to any client, such as a web br...
Stack Implementation Using Linked List in C
This program demonstrates a stack data structure implemented using a singly linked list, providing essential LIFO (Last-In-First-Out) operations inclu...
Stack Implementation Using Linked List in GO
This Go program implements a stack data structure using a singly linked list, providing an interactive command-line interface for performing standard ...
Taking Multiple User Inputs with BufferedReader in JAVA
This program demonstrates how to take different types of user input in Java using a `BufferedReader`, which is an efficient way to read text from the ...
Traveling Salesman Problem via brute-force (backtracking) in C
The provided C program implements a brute-force solution to the Traveling Salesman Problem (TSP), a classic combinatorial optimization challenge that ...
UNIX Domain (File) Socket-Based Client-Server Communication in C
This pair of programs demonstrates inter-process communication using UNIX domain sockets, where two processes on the same machine communicate through ...
No matching results
Try adjusting your search terms or filters.