Top new questions this week:
|
I implemented a two-dimensional array in C and would like to know if the implementation is sound in terms of Memory management Potential bugs and other side effects that I missed Code style (…
|
I fairly started coding no more than 2 weeks now; not even for long, and a thread inspired me to make a random back-to-forth game between a Hero and a Monster where it randomly choose a certain number …
|
I am in a fantasy football league and each week I send out a power rankings poll through Microsoft Forms. People will send in their rankings poll and I will create a graphic based on responses. I was …
|
I am solving this problem that requires returning the most frequent K elements, and even though I have a solution, I am wondering if there’s an improvement that can be made. It runs O(N) to store the …
|
Preface I need to generate some algebraic expressions for math testing in elementary school. The test should generate a list of expressions compiled according to certain rules and check the …
|
I am a beginner in assembly and would like to know ways I could improve my code. I am talking more about assembly specific things and less the logic e.g. what I could’ve written better, like loops <...
|
From The C Programming Language, by Kernighan and Ritchie: Exercise 1-13. Write a program to print a histogram of the lengths of words in its input. It is easy to draw the histogram with the bars …
|
Greatest hits from previous weeks:
|
I have written this code to search for a string in a .txt file. Is it possible to optimize the code so that it searches for the string in fastest manner possible? …
|
I’ve been practicing implementing a linked list from scratch. Can someone help review my code? …
|
I am using ExcelDataReader to import an Excel file to a dataset. Example Excel table: …
|
I needed a way to remove elements on a List while iterating through it. Supposedly something like this (illegal code): …
|
To learn more about OOP, @nhgrif challenged me to implement a Shape abstract class (more details in code remarks below. Here is how I did it. Any and all advice appreciated! Shape.java …
|
In my PowerShell script I’m trying to delete a folder, but only if it exists: if (Test-Path $folder) { Remove-Item $folder -Recurse; } I find myself repeating …
|
I am making an app and I want somebody to check my code to maybe make it shorter, fix bugs, or add some things. …
|
Can you answer these questions?
|
Description of the problem and the input data is here adventofcode.com/2022/day/8. The algorithm is essentially: Find the cumulative max value in a given direction and shift by 1 Find the …
|
Background I am trying to recreate the functionality of HYPERLINK() on my own terms, as a custom UDF called Hyper_Link(). My …
|
This is a problem from Exercism here, the goal is to clean up badly formatted phone numbers. The rules are: If the phone number is less than 10 digits assume that it is a bad number If the phone …
|