Questions tagged [beginner]

Add this tag to your question to indicate that you are new to the language of your code. This will often be taken into consideration by reviewers when assessing your code.

Filter by
Sorted by
Tagged with
2
votes
1answer
20 views

Database playground

This is my very first interaction with databases. The goal is to setup a safe playground on an Arch box to create tables and make queries. I want to learn the basics without risking ...
5
votes
2answers
67 views

Removing OO style coding from Haskell

Having coded in Objected-Oriented style my entire programming career, it's hard to adapt to functional style fully. I implemented a simple Hangman game: ...
0
votes
0answers
2 views

LeetCode 924: Minimize Malware Spread

I'm posting my code for a LeetCode problem copied here. If you would like to review, please do so. Thank you for your time! Problem In a network of nodes, each node i is directly connected to another ...
2
votes
2answers
75 views

LeetCode 273: Integer to English Words

I'm posting my code for a LeetCode problem copied here. If you would like to review, please do so. Thank you for your time! Problem Convert a non-negative integer to its English words representation. ...
12
votes
4answers
950 views

Making kexec reboots less painful

kexec is a way for a Linux kernel to directly boot another Linux kernel without going through the usual BIOS startup sequence, which can take several minutes on enterprise servers. The big problem ...
1
vote
0answers
21 views

Should I unpack a Maybe with maybe or pass value around

I'm beginning (for the third time in 5 years) to learn Haskell and decided to do a "More or less" console game (game pick a random number, you then have to guess which). First the code, then ...
1
vote
1answer
32 views

Ruby calculator for a grocery store

I have been working on this code to meet the best OOP standards for production. The code is working but I wish to make this a more efficient code. Could someone help me out here to make this efficient ...
6
votes
2answers
2k views

Hackerrank Lower Bound-STL

This is still my first week of learning C++, I solved the lower bound STL challenge in Hackerrank Lower bound STL but I'm having time exceeded issue for long input. I'm open to constructive criticism, ...
6
votes
4answers
6k views

Project Euler problems 1 and 2 in python

What do you think about my code? I am a beginner and just started doing some algorithmic exercises to sharpen up my python skills. Here is code for problem #1: ...
5
votes
2answers
50 views

Chemical reactor with UV light project in python

Introduction I'm new to python and made this code which computes the decay of sulphur dioxide (SO2) pollutant in a chemical reactor by ozone (O3) when it is hit by UV light. Code description Short ...
1
vote
1answer
45 views

LeetCode 639: Decode Ways II

I'm posting my code for a LeetCode problem copied here. If you would like to review, please do so. Thank you for your time! Problem A message containing letters from A-Z is being encoded to numbers ...
1
vote
2answers
47 views

Adapter for RecyclerView with supported onClick handling and select color text on last clicked item

I have written an adapter for RecyclerView. It can handle onClicks for RecyclerView items and select the color name and edit <...
2
votes
2answers
50 views

LeetCode 862: Shortest Subarray with Sum at Least K

I'm posting my code for a LeetCode problem copied here. If you would like to review, please do so. Thank you for your time! Problem Return the length of the shortest, non-empty, contiguous subarray ...
3
votes
3answers
1k views

Binary Tree Sort Algorithm (Python)

A Binary Tree Sort is an algorithm that builds a binary search tree from the elements to be sorted, and then traverses the tree (in-order) so that the elements come out in sorted order. Average Case ...
6
votes
2answers
1k views

Generating complementary DNA sequence

I am still relatively new to Python but I have been actively doing sample examples to try and get used to problem solving aspect of programming. With that said, I stumbled upon a question that asks ...
3
votes
0answers
19 views

Printing a number from memory in assembly

I'm trying to work up to being able to print the hailstone sequence in assembly. To do that though, I first needed to learn how to actually print a number out using the ...
3
votes
1answer
43 views

LeetCode 894: All Possible Full Binary Trees

I'm posting my code for a LeetCode problem copied here. If you would like to review, please do so. Thank you for your time! Problem A full binary tree is a binary tree where each node has exactly 0 ...
4
votes
1answer
48 views

A simple reactjs form to calculate the liquidity ratio, daily cost of running, and days cash on hand

This is just a very simple form that tells you the liquidity ratio, daily cost of running, and days cash on hand of a company, given their current assets, current liabilities, and total expense of the ...
4
votes
3answers
97 views

Hotel booking with multiple options. Improvement through subclasses?

The code below runs perfectly fine as I want it to. I'd like to create more subclasses to get a better overview over the whole code. Can I place the setter and getter as well as the methods into the ...
1
vote
1answer
34 views

LeetCode 410: Split Array Largest Sum

I'm posting my code for a LeetCode problem copied here. If you would like to review, please do so. Thank you for your time! Problem Given an array which consists of non-negative integers and an ...
3
votes
1answer
31 views

Simple program to print from a buffer until a newline is found

For practice, I wrote a small program that goes through a string in the data section (although, it could be easily adapted to take user input), and print out the characters in the string until it ...
0
votes
0answers
35 views

LeetCode 212: Word Search II

I'm posting my code for a LeetCode problem copied here. If you would like to review, please do so. Thank you for your time! Problem Given a 2D board and a list of words from the dictionary, find all ...
1
vote
0answers
28 views

LeetCode 284: Peeking Iterator

I'm posting my code for a LeetCode problem copied here. If you would like to review, please do so. Thank you for your time! Problem Given an Iterator class interface with methods: ...
3
votes
4answers
133 views

Short code in Python Rock Paper Scissors

I am studying and practicing Python; this is my Rock-Paper-Scissors game I've built from scratch. I saw this task is for beginners. When writing this in all the examples I saw dozens of lines of code ...
3
votes
0answers
65 views

Particle Swarm Optimization template

I am trying to create a PSO algorithm template for my project. I've decide to make the Swarm as separate type and ...
3
votes
1answer
53 views

Solution to the n-queens puzzle in Ruby

I started studying programming in January of this year and found a free online course that teaches Ruby. Below is my solution to the Eight Queens problem. I wanted my solution to be able to return any ...
13
votes
4answers
2k views

Calculator application

I am new to C programming, I previously studied Python. Below is my year one project in C. My project's name is "Advanced Calculator", it's a menu-driven calculator application with several ...
0
votes
1answer
31 views

LeetCode 652: Find Duplicate Subtrees

I'm posting my code for a LeetCode problem copied here. If you have time and would like to review, please do so. Thank you! Problem Given a binary tree, return all duplicate subtrees. For each kind ...
3
votes
1answer
30 views

Bubble Sort in Forth (for strings)

I wrote the following Forth code for sorting a string with the Bubble Sort method. It looks nice to my eyes, but I'd like your experienced opinion and any comments about the code you might have. In ...
6
votes
2answers
198 views

Part 1: Send HTTP request for each row in Excel table

Update: This is an older version of the question/script. The new version can be found here: Part 2: Send HTTP request for each row in Excel table I have an Excel spreadsheet where users can batch-...
3
votes
1answer
113 views

Script for generating a report in Google-Spreadsheets. Looks for various values to check and count

It all works exactly as it should. It finds data from today, finds unique emails and puts them in an array. I then check the data again from today, against the emails to total up different values. ...
0
votes
1answer
63 views

How can I find the type of number entered by the user?

I am making a fractions calculator that can calculate fractions, whole numbers and mixed fractions. So there is a String fraction, which is the input. Also, the user will enter the fraction in a ...
2
votes
2answers
52 views

Rock Paper Scissors Lizard Spock in C#

A few days ago I made a "Rock Paper Scissors" game in C# and got my code reviewed on this site. Someone suggested writing a "Rock Paper Scissors Lizard Spock" game and I did. I ...
6
votes
0answers
52 views

Using get_dummies to create a Simple Recommender System - Cold Start

Question: was using get_dummies a good choice for converting categorical strings? I used get_dummies to convert categorical ...
4
votes
2answers
95 views

LeetCode 1032: Stream of Characters

I'm posting my code for a LeetCode problem copied here. If you have time and would like to review, please do so. Thank you! Problem Implement the StreamChecker ...
1
vote
1answer
47 views

Rock paper scissor game in Python

Hello am a new to Python and my programming concept is catching up to me. I just created my first ever project. I did not look else where for an answer, and it took me 6 hours to write. How can I ...
4
votes
2answers
1k views

Project Euler Problem 21 in Python: Summing amicable numbers

Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n). If d(a) = b and d(b) = a, where a ≠ b, then a and b are an amicable pair and each of a and b ...
9
votes
3answers
933 views

Convert Roman Numerals to integers

I am a beginner, and so I have decided to program a Roman Numeral to Arabic integer converter. I came up with all of the code on my own. There are differing opinions about what constitutes 'proper' ...
4
votes
1answer
58 views

Calculator console app in Java

Here is my source code for my very first app in Java. I am completely new to the language; any help and criticism is welcomed! ...
3
votes
3answers
4k views

Game of Life (Java)

This is a simple implementation of Conway's Game of Life in Java. The algorithm I use is inefficient however. Every Cell's neighbors (alive or dead) are checked on every iteration. ...
2
votes
2answers
42 views

Project Euler 8: find the maximum product of 13 consecutive digits

I'm doing Project Euler problems as a learning platform for Forth. Currently I'm solving Project Euler Problem 8 which involves a 1000-long string, which I entered directly in the source code. My ...
2
votes
1answer
53 views

LeetCode 753: Cracking the Safe

I'm posting my code for a LeetCode problem copied here. If you have time and would like to review, please do so. Thank you! Problem There is a box protected by a password. The password is a sequence ...
2
votes
1answer
65 views

Parse and format var_dump data to become more readable

I have a class that exposes var_dump data in order to get better human readable layout. I have achieved this with a lot of ...
6
votes
1answer
57 views

GenBank to FASTA format using regular expressions without Biopython

This is a Biopython alternative with pretty straightforward code. How can I make this more concise? ...
10
votes
1answer
1k views

I made Tic Tac Toe in C

I made this Tic Tac Toe game in C. It works but I thinks it could be programmed better. You have the option to play alone or between two players. It also lets the player select if he uses 'X' or 'O'. ...
1
vote
2answers
80 views

LeetCode 1293: Shortest Path in a Grid with Obstacles Elimination

I'm posting my code for a LeetCode problem copied here. If you have time and would like to review, please do so. Problem Given a m * n grid, where each cell is either 0 (empty) or 1 (obstacle). In ...
2
votes
1answer
57 views

Automatically turn off PC with Python and PyQt5

I am a beginner in programming with Python. I am going to start my first job in this specialization. Can I use this code for presenting my skills at an interview? ...
2
votes
1answer
53 views

Simple Playlist Editor/Player

I am starting with Java and at the beginning I would like someone to catch what mistakes I make. I would like my code to look its best and I want to learn good Java writing habits. Could anyone ...

1
2 3 4 5
129