Letsgo

A website for learning go

  • Home
  • About
  • Getting Started
  • Try Ghost
Subscribe

Problem

Question : No problem statement.Find the logic from the given sample input/output. And answer Q queries. Sample TestCase : Input : 8 10 30 45 9 69 77 127 150 Output : 8

Solve The problem!

Question : The problem is like this: You are given an array, A of size N. You have to find the strength of all the elements of the array. And the strength of

Implementation of Sieve of Eratosthenes in GO

Sieve of Eratosthenes Sieve of Eratosthenes is a simple and ancient algorithm used to find the prime numbers up to any given limit. It is one of the most efficient ways to find

Suras Kumar Nayak

Implementation of Shell Sort in GO

Shell Sort : Shell sort is a highly efficient sorting algorithm and is based on insertion sort algorithm. This algorithm avoids large shifts as in case of insertion sort, if the smaller value

Suras Kumar Nayak

Implementation of Radix Sort in GO

Radix Sort : The lower bound for Comparison based sorting algorithm (Merge Sort, Heap Sort, Quick-Sort .. etc) is Ω(nLogn), i.e., they cannot do better than nLogn. Counting sort is a linear time

Suras Kumar Nayak

Implementation of Quick Sort in GO

Quick sort : Like Merge Sort, QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot. There are many different versions

Suras Kumar Nayak

Implementation of Linear Search in GO

Linear Search Linear search is a very simple search algorithm. In this type of search, a sequential search is made over all items one by one. Every item is checked and if a

Suras Kumar Nayak

Implementation of Heap in GO

Heap Sort Heap sort is a comparison based sorting technique based on Binary Heap data structure. -It is similar to selection sort where we first find the maximum element and place the maximum

Suras Kumar Nayak

Implementation of Depth First Search in GO

Depth First Search : The DFS algorithm is a recursive algorithm that uses the idea of backtracking. It involves exhaustive searches of all the nodes by going ahead, if possible, else by backtracking.

Suras Kumar Nayak

Implementation of Binary Search in GO

Binary Search Binary search is a fast search algorithm with run-time complexity of Ο(log n). This search algorithm works on the principle of divide and conquer. For this algorithm to work properly, the

Suras Kumar Nayak

Implementation of Breadth First Search in GO

Breadth First Search Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred

Suras Kumar Nayak

Implementation of Minimum spanning tree in GO

Minimum spanning tree A minimum spanning tree (MST) or minimum weight spanning tree is a subset of the edges of a connected, edge-weighted (un)directed graph that connects all the vertices together, without any

Suras Kumar Nayak

Implementation of Topological Sort in GO

Topological Sort : Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge uv, vertex u comes before v in the ordering. Topological Sorting

Suras Kumar Nayak

Implementation of Merge Sorting in Go

Merge Sorting In computer science, merge sort (also commonly spelled mergesort) is an efficient, general-purpose, comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the implementation preserves the input order

Kaushtub Rawat

Implementation of Insertion Sorting in Go

Insertion Sorting Insertion sort is a simple sorting algorithm that builds the final sorted array (or list) one item at a time. It is much less efficient on large lists than more advanced

Kaushtub Rawat

Median In a Row-Wise sorted Matrix

Question : We are given a row wise sorted matrix of size r * c, we need to find the median of the matrix given. It is assumed that r*c is always odd.

Naman Tiwari

Implementation of Trie Datastructure in GO

Trie Datastructure Tries are an extremely special and useful data-structure that are based on the prefix of a string. They are used to represent the “Retrieval” of data and thus the name Trie.

Suras Kumar Nayak

Implementation of Tree Datastructure in GO

Tree Datastructure A tree is a collection of nodes connected by directed (or undirected) edges. A tree is a nonlinear data structure, compared to arrays, linked lists, stacks and queues which are linear

Suras Kumar Nayak

Implementation of Stack Datastructure in GO

Stack Datastructure Stack is an abstract data type with a bounded(predefined) capacity. It is a simple data structure that allows adding and removing elements in a particular order. Every time an element is

Suras Kumar Nayak

Implementation of Bucket Sort in GO

Bucket Sort : Bucket sort is a comparison sort algorithm that operates on elements by dividing them into different buckets and then sorting these buckets individually. Each bucket is sorted individually using a

Suras Kumar Nayak

Implementation of Linked List Datastructure in GO

Linked List Datastructure Like arrays, Linked List is a linear data structure. Unlike arrays, linked list elements are not stored at contiguous location; the elements are linked using pointers. Why Linked List Datastructure

Suras Kumar Nayak

Implementation of Bubble Sorting in Go

Bubble Sorting Bubble sort is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong

Kaushtub Rawat

Implementation of Binary Tree Datastructure in GO

Binary Tree Datastructure We extend the concept of linked data structures to structure containing nodes with more than one self-referenced field. A binary tree is made of nodes, where each node contains a

Suras Kumar Nayak

Implementation of Queue Datastructure in GO

Queue Datastructure Queue is an abstract data type or a linear data structure, in which the first element is inserted from one end called REAR(also called tail), and the deletion of existing element

Suras Kumar Nayak

Implementation of Selection Sorting in Go

Selection Sorting In computer science, selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) time complexity, making it inefficient on large lists, and generally performs worse than the

Kaushtub Rawat

Reverse words in a given String Solution in Go

Reverse words in a given String Question: Given a String of length N reverse the words in it. Words are separated by dots. Constraints : 1<=T<=20 1<=Length of String<=2000 Sample Input: The first

Kaushtub Rawat

Set bits from 'l' to 'r' in Go

Set bits from ‘l’ to ‘r’ in Go Question : Given a non-negative number N and two values L and R. The problem is to set all the bits in the range L

Naman Tiwari

Day 6 Solution In Go

Solution for ‘Set all the bits in given range of a number’ in GO. Author@ Suras Kumar Nayak Set all the bits in given range of a number Question: Given a non-negative number

Beautiful SubSequence Solution in Go

Beautiful SubSequence Question: Nowadays Babul is solving problems on sub-sequence. He is struck with a problem in which he has to find the longest sub-sequence in an array A of size N such

Suras Kumar Nayak

Find out the Team Solution in Go

Find out the Team Question: A school is conducting a debate competition in which participation is in teams. Stefan is the manager of the event. So has to allot students to different teams.

Suras Kumar Nayak

Hello

Hello, You might be hearing terms such as Git and Github all the time but you weren’t able to know what it is or how it works.When you will finish reading this article

Day 2 Solution In Go

Rank of all elements in an array Question: Given an array of N integers with duplicates allowed. All elements are ranked from 1 to N if they are distinct. If there are say

Rank of all elements in an array Solution in Go

Rank of all elements in an array Question: Given an array of N integers with duplicates allowed. All elements are ranked from 1 to N if they are distinct. If there are say

Naman Tiwari

What Is Git

Version Control System (keep reading and this will make sense towards the end). Let’s say you have a project you want to work on. Now you have two primary motives: To write some

Even-Odd turn game Solution in Go

Even-Odd turn game Question: Given three positive integers X, Y and P. Here P denotes the number of turns. Whenever the turn is odd X is multiplied by 2 and in every even

Nikita Jain

Getting Started

First, signup on GitHub. Next, Download Git for you OS from this page: Git-Downloads Next you go and do this: Create A Repo -Github Help So now you have created a repository online,

One Step Ahead

If you forked someone’s repository (forked, explained under terminology, scroll up) then follow these instructions Fork A Repo - Github Help and then the commands below. If you are the upstream yourself, (i.e.

Letsgo © 2018
Proudly published with Jekyll & GitHub Pages using Jasper2
Latest Posts Ghost
Letsgo

Subscribe to Letsgo

Stay up to date! Get all the latest & greatest posts delivered straight to your inbox