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
17 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. ...
1
vote
0answers
17 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 ...
-3
votes
0answers
18 views

Fix Hangman Game in Python [duplicate]

Can someone help me make a losing conditon in the function of " engine() " . i cant seem to make it because making an "else" loop causes the function to recheck it to every ...
-3
votes
0answers
33 views
2
votes
2answers
41 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
0answers
18 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 ...
5
votes
1answer
22 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 ...
4
votes
1answer
40 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 ...
3
votes
1answer
39 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 ...
1
vote
1answer
30 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
30 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 ...
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: ...
4
votes
3answers
87 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 ...
3
votes
0answers
61 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 ...
0
votes
0answers
34 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 ...
0
votes
1answer
30 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 ...
0
votes
1answer
61 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
50 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 ...
3
votes
1answer
46 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 ...
4
votes
2answers
94 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 ...
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 ...
1
vote
1answer
46 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 ...
9
votes
3answers
921 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
57 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! ...
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 ...
2
votes
1answer
52 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? ...
2
votes
2answers
41 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 ...
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
51 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 ...
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? ...
3
votes
2answers
67 views

Tic-Tac-Toe in Java

I am currently learning Java; I could really use some help from more experienced programmers. How can I clean up my Tic-Tac-Toe code? What mistakes have I made? Can I use more exception handling? I ...
5
votes
3answers
252 views

Find all numbers that are factors of one array and factor into the second array, then print their count

I'm working on a solution to the Following problem on Hackerrank, and I seem to have found a function that works for the purpose. However, I feel as though this is a very overdesigned solution to a ...
3
votes
4answers
131 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 ...
1
vote
1answer
58 views

C - 2D peak finder in

This is an implementation of a 2D peak finder from MIT's Intro to Algos. I'm a C beginner and I would really like some feedback on coding style, documentation and any other general C bad practices. ...
3
votes
1answer
55 views

Calculate and displays the sum of all numbers from 1 to 20

This is a beginner's class. I just need help verifying if this code is correct, or edit the parts that need fixing. ...
1
vote
1answer
50 views

LeetCode 552: Student Attendance Record II

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 positive integer n, return the number of all possible ...
6
votes
2answers
196 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-...
-1
votes
1answer
56 views

LeetCode 1320: Minimum Distance to Type a Word Using Two Fingers II

I'm posting my Python code for LeetCode's 1320. If you have time and would like to review, please do so. Problem You have a keyboard layout as shown above in the XY plane, where each English ...
1
vote
1answer
53 views

LeetCode 1320: Minimum Distance to Type a Word Using Two Fingers I

I'm posting my C++ code for LeetCode's 1320. If you have time and would like to review, please do so. Thank you! Problem You have a keyboard layout as shown above in the XY plane, where each English ...
-1
votes
1answer
52 views

LeetCode 375: Guess Number Higher or Lower II

I'm posting my C++ code for LeetCode's Guess Number Higher or Lower II. If you have time and would like to review, please do so. Problem We are playing the Guess Game. The game is as follows: I pick ...
1
vote
0answers
45 views

LeetCode 200: Number of Islands

I'm posting my C++ code for LeetCode's Number of Islands (which is a famous problem). If you have time and would like to review, please do so. Thank you! Problem Given a 2d grid map of '1's (land) ...
7
votes
1answer
83 views

Dijkstra algorithm C#

I have implementing a simple version of Dijkstra's algorithm in C#. I found it really confusing, and I'm not 100% if I've implemented it correctly. Could this be made more efficient? Does it need to ...
2
votes
1answer
52 views

Javascript array-matching beginner

As a beginner coder in js, I'd like to hear about further improvements of the following code, but nothing too advanced, please. The program is meant to work the following way: A user inputs a color ...
2
votes
1answer
65 views

LeetCode 146: LRU Cache III

I'm posting my Java code for LeetCode's LRU Cache. If you have time and would like to review, please do so. Thank you! Problem Design and implement a data structure for Least Recently Used (LRU) ...
1
vote
0answers
45 views

LeetCode 146: LRU Cache ||

I'm posting my Python 3 code for LeetCode's LRU Cache. If you have time and would like to review, please do so. Thank you! Problem Design and implement a data structure for Least Recently Used (LRU) ...
5
votes
1answer
81 views

LeetCode 146: LRU Cache I

I'm posting my C++ code for LeetCode's LRU Cache. If you have time and would like to review, please do so. Thank you! Problem Design and implement a data structure for Least Recently Used (LRU) cache....

1
2 3 4 5
129