Akhil Sharma has Published 671 Articles

Golang program to find the minimum number of coins needed to make a given amount of money

Akhil Sharma

Akhil Sharma

Updated on 05-Apr-2023 15:25:18

202 Views

In this golang article we are going to find the minimum number of coins needed to make a given amount of money if a list of coins with different denominations is given. We can use the Greedy Algorithm for this problem. Algorithm Step 1 − First, we need to ... Read More

Golang program to find maximum sum of a subarray with length k

Akhil Sharma

Akhil Sharma

Updated on 05-Apr-2023 15:24:43

337 Views

In this article we are going to understand how to use methods naming brute-force, sliding window and prefix sum methods of golang to find the maximum sum of a subarray with length k. We will also discuss the Algorithm for each method and provide code Examples to demonstrate their implementation. ... Read More

Golang program to traverse a circular linked list and print its elements

Akhil Sharma

Akhil Sharma

Updated on 05-Apr-2023 15:24:05

234 Views

In this article we are going to understand how to creat a golang program to traverse a circular linked list and print it’s element using simple for and while loop. Circular linked lists are a type of data structure where the last element of the list is connected to the ... Read More

Golang program to implement bucket sort

Akhil Sharma

Akhil Sharma

Updated on 05-Apr-2023 15:23:15

272 Views

In this article we will learn to develop a go language program to implement the bucket sort through using custom sorting Algorithm. In Bucket sort we sort the unsorted array in different bucket every bucket contains a wide range of elements. The elements present in each bucket are then sorted ... Read More

Implement circular linked list in Golang

Akhil Sharma

Akhil Sharma

Updated on 05-Apr-2023 15:21:58

474 Views

In this article we will learn how to write a go language program to implement circular linked list using struct and slice method. circular linked lists are created in such a way that each node of the linked list points to the next node and the last node points ... Read More

Implement Prims Algorithm in Golang

Akhil Sharma

Akhil Sharma

Updated on 05-Apr-2023 15:20:55

247 Views

In this article we are going to learn how to use Binary Heap method and Priority queue method to implement prims Algorithm in golang. Prim's Algorithm is used to find the minimum spanning tree of a weighted undirected graph. Algorithm Step 1 − First, we need to import the ... Read More

Implement Kruskals Algorithm in Golang

Akhil Sharma

Akhil Sharma

Updated on 05-Apr-2023 15:20:06

257 Views

In this article we are going to understand how to develop a golang program to implement kruskals Algorithm with the help of union-find Algorithm and priority queue approach. Kruskal's Algorithm is used to find the minimum spanning tree of a graph. Algorithm Step 1 − First, we need ... Read More

Golang program to check a graph is bipartite using DFS

Akhil Sharma

Akhil Sharma

Updated on 05-Apr-2023 15:18:02

139 Views

The Depth-First Search (DFS) Algorithm is a classic Algorithm used to traverse and search graphs. In this article we are going to learn how to develop golang program where we can check if a graph is bipartie or not using DFS . Here we will use two different approaches to ... Read More

Golang program to implement radix sort

Akhil Sharma

Akhil Sharma

Updated on 05-Apr-2023 15:17:20

294 Views

In this article we are going to understand how to use least significant bit and the most significant bit to implement radix sort. Radix sort is a sorting Algorithm that sorts elements by grouping them based on their individual digits or by the position of their digits. It is ... Read More

Implement tower of hanoi in Golang

Akhil Sharma

Akhil Sharma

Updated on 05-Apr-2023 15:16:03

274 Views

In this article we are going to learn how to use recursion method and iteration to implement tower of hanoi in golang. The Tower of Hanoi is a puzzle in which we move a set of disks from one page to another by moving one disk at a time. There ... Read More

Advertisements