Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
1 answer
153 views

Find potentional sponsor for every animal

This is a programming challenge in Czeck. My translation follows. Does anyone know what the time complexity of my code is? Input: The first line contains 2 integers: the number of animals 1 ≤N ≤100 ...
DemonCZ's user avatar
  • 33
1 vote
2 answers
161 views

Improving Project Euler code problem #10

So, I just finished Problem 10 on Project Euler, but it took about 3 to 4 minutes for my output to come out, due to bad coding, I guess, any suggestions on how could I optimize my code? Question The ...
fabinfabinfabin's user avatar
7 votes
1 answer
1k views

Displaying some multiples

Displaying Some Multiples Write a program to calculate the multiples of a given number. Have the user enter a number, and then use a for loop to display all the multiples of that number from 1 to 12. ...
user avatar
4 votes
1 answer
363 views

LeetCode 839: Similar String Groups II

I'm posting my code for a LeetCode problem. If you'd like to review, please do so. Thank you for your time! Problem Two strings X and Y are similar if we can swap two letters (in different positions) ...
Emma Marcier's user avatar
  • 3,702
3 votes
1 answer
287 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) cache....
Emma Marcier's user avatar
  • 3,702
2 votes
0 answers
813 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 ...
Emma Marcier's user avatar
  • 3,702
3 votes
1 answer
475 views

LeetCode 767: Reorganize String

Here I'm posting my 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 the ...
Emma Marcier's user avatar
  • 3,702
1 vote
1 answer
182 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...
Emma Marcier's user avatar
  • 3,702
1 vote
5 answers
13k 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, ...
Emma Marcier's user avatar
  • 3,702
1 vote
1 answer
667 views

Hangman game in beginning Java

Hangman game coded in Java (at a beginner's level) where Hangman.java can be run with one or more arguments. Hangman.java: ...
notak's user avatar
  • 605
3 votes
1 answer
850 views

Forming words that start with consonants and vowels

I am just starting to learn programming. I had already coded some functions and stuff in other languages, and whilst trying to complete this Python challenge Kevin and Stuart want to play the 'The ...
Max-Florian Luchterhand's user avatar
4 votes
3 answers
426 views

Find the first missing positive integer in an array of integers

The problem is the one explained in Given an unsorted integer array, find the first missing positive integer Given an unsorted integer array, find the first missing positive integer. For ...
user2761431's user avatar
5 votes
2 answers
247 views

Pig Latin Anslatortray

I've created a program that translates any word into the form of igpay atinlay or pig Latin! I got the project idea from here and you can read the rules here. My program outputs the same translation ...
Gabriel Diaz's user avatar
3 votes
2 answers
522 views

Non repeating character in Java

Given a string s consisting of lowercase Latin Letters, find the first non repeating character in s. Input: The first line contains T denoting the number of testcases. Then follows ...
Anirudh Thatipelli's user avatar
1 vote
2 answers
966 views

Star Elements implementation in Java

Given an unsorted array. The task is to find all the star and super star elements in the array. Star are those elements which are strictly greater than all the elements on its right side. Super ...
Anirudh Thatipelli's user avatar

15 30 50 per page