Found 27154 Articles for Server Side Programming

Golang program to implement a hash table with separate chaining

Akhil Sharma
Updated on 18-Oct-2023 15:48:59

165 Views

In computer science, hash tables are a crucial data structure for fast data retrieval. It is also known as hashmap and it stores and retrieves data based on a key-value pair. In this article we will implement a hash table in go with independent chaining. In the examples demonstrated below we are going to perform the operations like initialization, insertion and then displaying the hash table. Explanation As a data structure each slot in the hash table has a linked list of items that hash to the same index, making separate chaining a collision resolution strategy. In this method, ... Read More

Show Non-Central T-Distribution in Statistics using Python

Nikitasha Shrivastava
Updated on 18-Oct-2023 15:26:54

71 Views

In the given problem statement we have to show the non-central T-distribution in statistics with the help of Python Programming. So to show this distribution we will use the python libraries. The non-central T-distribution in statistics is a family of distribution which is shaped by degrees of freedom and non-centrality parameters. This distribution can be used in power analysis and hypothesis testing. Understanding the Problem The problem at hand is to show the non-central T-distribution using the Python libraries. So we will utilize the scipy.stats module. Because of this function we can show the distributions which also include non-central t-distribution. ... Read More

Golang program to implement a circular buffer

Akhil Sharma
Updated on 18-Oct-2023 15:46:22

422 Views

Circular buffers, a data structure that efficiently manages and cycles through data, provide a valuable solution. In this article, we will implement a circular buffer in go, showcasing its utility and practicality. The examples below demonstrate the operations like initialization, insertion and demonstration of a circular buffer. Explanation A circular buffer (also circular queue or ring buffer) is a fixed-size buffer operating as if the end and the beginning were connected, forming a loop. This ingenious data structure efficiently manages a continuous flow of data, making it an ideal choice for applications requiring data cycling and reuse. This is ... Read More

Golang program to implement a quadtree for spatial indexing

Akhil Sharma
Updated on 18-Oct-2023 15:40:52

124 Views

Spatial indexing is a crucial technique for efficiently organising and querying spatial data. Quadtree is a popular data structure used for spatial indexing, dividing a two-dimensional space into smaller regions. In this article, we will explore two different examples to implement a Quadtree in Golang. The examples demonstrated below are going to perform operations like initialization, insertion, display and visualisation of data of a quad tree. Explanation A quadtree as a tree data structure ensures that each node can have up to four children, a property commonly needed to partition a 2D space into smaller regions, allowing efficient indexing and ... Read More

Show Non-Central F-Distribution in Statistics using Python

Nikitasha Shrivastava
Updated on 18-Oct-2023 15:26:00

63 Views

In the given problem we have to show the non-central F-distribution with the help of Python and its libraries. So we will explore what non-central F-distribution is and how to show it using Python. Understanding the Non-Central F-Distribution The Non-Central F-Distribution is a probability distribution in statistics which is basically used for analyzing variance in the given data. It uses the central F-distribution by using the non-centrality parameters which are used to make deviation. The non-central F-distribution used to determine the probability of observing a particular statistics. The figure of this distribution is generated using the degrees of freedom with ... Read More

Golang program to implement a binary indexed tree (Fenwick tree)

Akhil Sharma
Updated on 18-Oct-2023 15:36:02

90 Views

Binary Indexed Tree (also Fenwick Tree) is a data structure that efficiently handles range queries and point updates on an array. In this article, we are going to explore two different methods to implement a binary indexed tree in go, here implementation means we are performing main operations of a binary indexed tree that are creating a BIT(initialization), updation and prefix sum query. Explanation Fenwick Tree is a binary tree structure which efficiently maintains cumulative information about an array, specifically prefix sums and allows faster updates and queries on ranges. It has applications in various algorithms and problems like finding ... Read More

Golang program to implement a persistent data structure (a stack)

Akhil Sharma
Updated on 18-Oct-2023 15:29:58

126 Views

Persistent data structures, such as a stack, are of pivotal significance to programming for organising and chronologically managing data efficiently. This article showcases different examples to implement a persistent data structure in go, focusing on stack. In the first example we use immutable slices to perform the operation, while the second method employs a linked list, here implementation means we are going to demonstrate the operations like insertion, updation and deletion on a persistent data structure. Explanation A persistent data structure allows preserving previous versions when modifications are to occur. In this context, a stack as a data structure ... Read More

Golang program to implement a concurrent hash trie

Akhil Sharma
Updated on 18-Oct-2023 15:24:13

55 Views

Concurrency is crucial to modern programming for enabling efficient use of resources in multi-core systems. Hash tries are associative data structures which provide a scalable and thread-safe handling of large amounts of data concurrently. In this article, we are going to learn to implement a concurrent hash trie in go, implementation here means we are going to demonstrate the operations like insertion, updation and deletion on a hash trie data structure. Explanation A concurrent hash trie as a data structure combines the benefits of hash maps and tries to allow multiple threads simultaneous access and modification rights associated with ... Read More

Show Non-Central Chi-squared Distribution in Statistics using Python

Nikitasha Shrivastava
Updated on 18-Oct-2023 15:24:38

89 Views

In the given problem statement we are required to show the Non-central Chi-squared distribution with the help of Python. So we will be using Python libraries to show the required result. Understanding the Non-Central Chi-squared Distribution The distribution called non-central chi-squared is a probability distribution in statistics. This distribution is mainly used in power analysis. It is a generalization of chi-squared distribution. It can be obtained by summing up the squares of standard normal random variables. In this the shape of the distribution is defined by the degrees of freedom. It incorporates a non-centrality parameter. This parameter shows the presence ... Read More

Golang program to implement a concurrent hash map

Akhil Sharma
Updated on 18-Oct-2023 15:19:24

209 Views

Concurrent hash maps can be perceived as efficient data structures for ensuring smooth and parallel execution. Designed to handle concurrent read and write operations efficiently, it is a valuable tool for building highly performant multi-threaded applications. In this article, we learn to implement a concurrent hash map in go. Syntax func NewConcurrentMap(size int) *ConcurrentMap The syntax defines a function named NewConcurrentMap defined to create and return an instance of a customized concurrent hash map named ConcurrentMap. Taking a size parameter to determine internal bucket count for data distribution, it encapsulates the initialization process. Algorithm Start by ... Read More

Advertisements