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
3
votes
1answer
56 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 ...
3
votes
1answer
76 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? ...
3
votes
2answers
44 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 ...
12
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'. ...
2
votes
2answers
93 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
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 ...
3
votes
1answer
61 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
73 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
256 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 ...
4
votes
4answers
172 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
62 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. ...
2
votes
1answer
54 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 ...
7
votes
2answers
206 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-...
0
votes
1answer
72 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
56 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 ...
2
votes
0answers
57 views

LeetCode 200: Number of Islands

I'm posting my code for a LeetCode problem. If you'd like to review, please do so. Thank you for your time! Problem Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. ...
7
votes
1answer
175 views

Dijkstra algorithm C#

I have implementing a simple version of Dijkstra's algorithm in C#. Could this be made more efficient? Does it need to be modified? ...
2
votes
1answer
53 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
68 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) ...
2
votes
1answer
74 views

LeetCode 146: LRU Cache II

I'm posting my code for a LeetCode problem. If you'd like to review, please do so. Problem Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following ...
5
votes
1answer
103 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
vote
0answers
24 views

Inheritance Challenge 2 - Employees, Bosses and Trainees in C#

Inheritance Challenge 2 - Employees, Bosses and Trainees Create a main class with a Main Method, then a base class Employee with the properties Name, FirstName, Salary and the methods Work() and ...
8
votes
1answer
231 views

Killing and reviving TV Characters

This program displays a list of TV characters. You can kill them off by random or bring them back by name. I have used the random.choice function. I've defined a ...
5
votes
2answers
87 views

Crawling a court website and downloading records

I am new to Python and I am using Python 3.8 and Selenium. This is a follow up of my previous question. Since I received several useful suggestions I have re-written the following code. The code works ...
5
votes
3answers
83 views

Nearest color algorithm efficiency

Ok so my name is qqqiiiiiiiifdff and I made this code that simulates a perceptual color picker algorithm that selects the nearest color by iterating over the color array and selecting the minimum ...
2
votes
0answers
27 views

Lispy code? Palindrome of product

My answer to Project Euler problem 4 (largest palindrome of product of two 3-digit numbers) is below. Please suggest improvements, style changes, indentation, commenting, naming, ... And nitpicks are ...
2
votes
2answers
128 views

LeetCode 1044: Longest Duplicate Substring

I'm posting my C++ code for LeetCode's Longest Duplicate Substring. If you have time and would like to review, please do so. Thank you! Problem Given a string S, consider all duplicated substrings: (...
1
vote
1answer
64 views

LeetCode 1146: Snapshot Array

I'm posting my C++ code for LeetCode's Snapshot Array. If you have time and would like to review, please do so. Thank you! Problem Implement a SnapshotArray that supports the following interface: ...
7
votes
1answer
95 views

Using TinyMCE with responsive file manager PHP and Javascript

I use TinyMCE with responsivefilemanager and I wanted to know that is my code well-written maintainable and readable, Sorry If this sounds like a stupid and basic question because this is such a basic ...
1
vote
1answer
65 views

LeetCode 399: Evaluate Division

I'm posting my C++ code for LeetCode's Evaluate Division. If you have time and would like to review, please do so. Thank you! Problem Equations are given in the format A / B = k, where A and B are ...
1
vote
1answer
61 views

LeetCode 809: Expressive Words

I'm posting my C++ code for LeetCode's Expressive Words. If you have time and would like to review, please do so. Thank you! Sometimes people repeat letters to represent extra feeling, such as "...
8
votes
2answers
419 views

Alphabet Rangoli Challenge

The question is about printing alphabets in a rangoli pattern of size/dimension input by the user. Example: ...
4
votes
1answer
93 views

Minimax based Tic Tac Toe

I am attempting to make an unbeatable Tic Tac Toe game using a simplified minimax algorithm. The code looks like this: ...
1
vote
0answers
69 views

LeetCode 218: The Skyline Problem II

Here I'm posting my Java code for the skyline problem. If you have time and would like to review, please do so, I'd appreciate that. Problem A city's skyline is the outer contour of the silhouette ...
1
vote
0answers
109 views

LeetCode 767: Reorganize String

Here I'm posting my Java code for the Reorganize String problem on LeetCode. If you have time and would like to review, please do so, I'd appreciate that. On LeetCode, we are only allowed to change ...
-1
votes
1answer
74 views

LeetCode 76: Minimum Window Substring - Python

I'm posting a two-pointer, sliding-window problem of LeetCode (Minimum Window Substring) solved with Python. If you have time and would like to review the code, please do so, I appreciate that. On ...
0
votes
1answer
76 views

LeetCode 76: Minimum Window Substring

I'm posting an sliding window problem of LeetCode (Minimum Window Substring) with C++. If you have time and would like to review the code, please do so, I appreciate that. On LeetCode, we are only ...
0
votes
1answer
94 views

LeetCode 76: Minimum Window Substring - Java

I'm posting my Java code for the Minimum Window Substring. If you have time and would like to review, please do so, I appreciate that. Problem Given a string string...
11
votes
2answers
1k views

A pretty simple Rock, Paper, Scissor game on C++

I've decided to learn more about C++ with the time that I have right now through Udemy courses. To test out the stuff that I've learned up until now, I decided to try and code with some of the ...
1
vote
1answer
104 views

LeetCode 560: Subarray Sum Equals K - C++/Java

According to LeetCode, the following question is one of the most frequent interview questions asked by companies such as Facebook and Google. Here, I'm posting C++/Java codes, if you'd like to review, ...
0
votes
5answers
724 views

LeetCode 1: Two Sum

This is an easy level LeetCode question, obviously not much code to review. I'm posting C++/Java/Python here. If you'd like to review, please do so. Thank you! Problem Given an array of integers, ...
15
votes
4answers
2k views

Calculator in C++

I made a calculator in C++. I wanted to ask is this code well written, understandable, and alright. ...
5
votes
2answers
110 views

How to optimize Karatsuba algorithm (using arraylist and java)

I was using Karatsuba algorithm to multiply two polynomials and return the coefficients and I am using java, we are asked to use arraylists here, however, my code is too complicated and it takes much ...
1
vote
1answer
32 views

Semantic implementation of the structure of a web page with header, main, and footer

I'm new to web development, and currently learning the basics of HTML and CSS. Many web pages follow the structural pattern of header, main, and footer; so I figured it'd be a good idea to try and ...
2
votes
0answers
40 views

Creating an API in Go to work with Github

I am fairly new to Golang and I was creating an API to fetch commits from any Github repository using their API. I was then creating a frequency count, based on the date and then sending it to the ...
3
votes
1answer
37 views

Looking for improvements on basic dice roll code (Python 3)

I've created a code based upon a dice roll where the number of rolls is decided by user input. I am new to this, so any and all feedback will be appreciated as I feel the code is quite clunky at best. ...
3
votes
4answers
182 views

Rock, Paper, Scissors in C#

First of all, I am very new to programming and also this site. This is a very simple "Rock, Paper, Scissors" game I made in C#. At first, it asks if I want to play the game. If my answer is yes, then ...