All Questions
Tagged with go programming-challenge
20 questions
1
vote
1
answer
207
views
golang - Kth largest element in an array using quick select - time limit exceeded issue
I am trying to solve the following problem in leetcode.
https://leetcode.com/problems/kth-largest-element-in-an-array/description
Given an integer array \$nums\$ and an integer \$k\$, return the \$k^\...
1
vote
2
answers
175
views
Improving my solution to the Quiz project from Gophercises in Golang
I'm new to Go and I completed the first challenge from Gophercises. Any feedback would be highly appreciated.
There are some things that I am unsure of if they are made in an optimal way.
Github repo
...
4
votes
2
answers
142
views
Project Euler 67 | Maximum sum path II reading from file
I tried to solve the Problem Euler 67 with golang, because I started to study Go recently.
This is my solution:
...
2
votes
1
answer
229
views
Go pig Latin translator
I've been recently fooling around with Go(lang) and ended up doing a (very) simple pig Latin parser. I'm pretty sure this is not the best solution out there (no punctuation and only lowercase letters) ...
4
votes
2
answers
718
views
Computing Scrabble score in Golang
I think we all know the game of Scrabble and how popular it is as a simple programming challenge. Here's my attempt at computing a Scrabble score for a given word done in Go.
I must admit, I'm fairly ...
5
votes
1
answer
250
views
Golang checks for equilateral, isosceles, or scalene triangle
For me, learning the basics of a new programming language is best done through some easy to intermediate challenges. Here's one that's rather well known and relatively simple - determine if a triangle ...
1
vote
1
answer
73
views
Simulating pod racing over a 2D map : am I implementing OOP in a GO-like fashion?
I'm learning Go and I wrote this for a programming challenge. It is working (building and running) but I feel the code is not what Go code should be.
I used an OOP design. Is it correctly implemented ...
3
votes
0
answers
106
views
Writing Go object code that respects Go guidelines
I'm learning Go and I wrote this for a programming challenge. It is working (building and running) but I feel the code is not what Go code should be:
Am I using the ...
0
votes
1
answer
332
views
Finding the longest Collatz sequence using Go, concurrently
I am working through this problem on project euler.
Basic purpose of the code:
...
5
votes
3
answers
375
views
Beginner solution to basic quiz exercise, a la Gophercises
I just started golang development about two weeks ago and recently finished the recommended introduction book.
I'm now working my way through Gophercises - a sort of collection of exercises to ...
3
votes
1
answer
440
views
Cryptopals Challenge 1.6 Solution in Golang
This is my solution to challenge 1.6 from Matasano/NCC Cryptopals.
Here is my repository so the code can be cloned/ran and the bitutils/futils code can also be looked at if necessary (I've created ...
3
votes
1
answer
399
views
Parallel brute-force solution for Project Euler 4 (Largest palindrome product)
The pe4Concurrent.go file given below is my first attempt at writing a concurrent programme, pe4.go is a non-concurrent implementation of the same algorithm for comparison purposes.
The algorithm ...
2
votes
1
answer
52
views
Go version of Advent of Code, day 5 - Dealing with runes
I tried to solve the Advent of Code quiz for day 5 in Go, since my brute force algorithm wasn't efficient in Ruby. I solved the first part of the quiz with the following Go code.
...
2
votes
1
answer
288
views
Project Euler #1 in Go (counting multiples of 3 or 5 up to 1000)
I've been working on Project Euler, here was my solution for Problem #1. It gave me the proper answer, but it's egregiously slow. How can I implement this more efficiently? My math skills aren't top-...
4
votes
0
answers
122
views
Project Euler #2 in Go
I just learned Go (yesterday in fact) and today I made this solution to Project Euler #2. The problem is to sum the even Fibonacci numbers. My program uses the matrix representation of the linear ...