Git Product home page Git Product logo

Comments (14)

anandwana001 avatar anandwana001 commented on June 24, 2024 2

@mubaris trying for stack, will do PR soon

from algorithms.

anandwana001 avatar anandwana001 commented on June 24, 2024 1

@mubaris @gauthamzz I got busy with my exams but free now. Here I tried to make a stack in Go. please if you could give some feedback.

img_20180107_094056

package main

import "fmt"

type Stack struct {
	size int
	top *Node
}

type Node struct {
	value string
	next *Node
}

func (s *Stack) Length() int {
  return s.size
}

func (s *Stack) Push(val string) {
	s.top = &Node{val, s.top}
	fmt.Printf("%v pushed to stack\n",val)
	s.size++
}

func (s *Stack) Pop() (val string) {
  if s.size > 0 {
    val, s.top = s.top.value, s.top.next
    s.size--
    return 
  }
  return
}

func main() {
	stack := &Stack{}
	
	stack.Push("10")
	stack.Push("20")
	stack.Push("30")
	
	fmt.Println()
	
	for stack.Length() > 0 {
		fmt.Printf("%s popped from stack\n", stack.Pop())
	}
}

from algorithms.

marshallKR7 avatar marshallKR7 commented on June 24, 2024 1

@mubaris @gauthamzz done Linked List implementation through PR #22

from algorithms.

arpitmisraw avatar arpitmisraw commented on June 24, 2024 1

I want to work on heaps.

from algorithms.

gauthamzz avatar gauthamzz commented on June 24, 2024

sounds good @anandwana001

from algorithms.

gauthamzz avatar gauthamzz commented on June 24, 2024

send pr ,it looks good

from algorithms.

pani-vishal avatar pani-vishal commented on June 24, 2024

Is this for everyone, if not can it be assigned to me?

from algorithms.

mubaris avatar mubaris commented on June 24, 2024

As of now only Stack and Queue are implemented.

Each Data Structure will get 10 points. If you would like to take this issue, Take Each DS one by one and comment you're working on it.

from algorithms.

pani-vishal avatar pani-vishal commented on June 24, 2024

Alright I would like to work on making a linked list.

from algorithms.

mubaris avatar mubaris commented on June 24, 2024

@falconis Sure

from algorithms.

ProBeta1 avatar ProBeta1 commented on June 24, 2024

May I work on Graph ?

from algorithms.

gauthamzz avatar gauthamzz commented on June 24, 2024

Yeah sure

from algorithms.

namantw avatar namantw commented on June 24, 2024

Can I do the Binary Search tree?

from algorithms.

gauthamzz avatar gauthamzz commented on June 24, 2024

yea sure @namantw

from algorithms.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.