Questions tagged [programming-challenge]

Programming challenges are off-site challenges meant to offer programmers educational experiences while testing their abilities.

Filter by
Sorted by
Tagged with
6
votes
3answers
84 views

Counting the triangles that can be formed from segments of given lengths

Problem Statement: Given an unsorted array of positive integers. Find the number of triangles that can be formed with three different array elements as lengths of three sides of triangles. ...
4
votes
2answers
78 views

Calculate the rates at which users get stuck at each stage

I completed an algorithm problem just as a personal study, and I can't help but feel like my solution is a bit needlessly complicated, although I can't figure out a better way to do it. Here's the ...
8
votes
4answers
674 views

Expanding powers of expressions of the form ax+b

I solved the following problem: Write a function expand that takes in an expresion with a single, one character variable, and expands it. The expresion is in the form ...
2
votes
1answer
39 views

Convert a Binary Tree to Doubly Linked List

Challenge Link on geeksforgeeks: Binary Tree to DLL Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL) In-Place. The left and right pointers in nodes are to be used as previous ...
6
votes
1answer
109 views

Immediate Smaller Element Time Limit Exceeded

Immediate Smaller Element The code is working fine Code is here. For each element in the array, check whether the right adjacent element (on the next immediate position) of the array is smaller. If ...
-5
votes
0answers
25 views

Project Euler : Multiples of 3 and 5 c++ [on hold]

I have implemented below code for the topic mentioned. Results are coming incorrect in c++. same code is working correctly in python why? ...
2
votes
0answers
35 views

Introduction to Haskell: Validating credit card numbers

I have implemented the introductory challenge of University of Pennsylvania's CIS 194: Introduction to Haskell (Spring 2013) course. I have added the most important information of the problem ...
-4
votes
0answers
16 views

Testing for odd and even numbers between 1 and 10 [on hold]

I wrote this code to check for numbers between 1 and 10and it's not working well. Here is the line of codes: ...
6
votes
3answers
385 views

LeetCode: Group Anagrams C#

LeetCode: Group Anagrams C# Given an array of strings, group anagrams together. ...
3
votes
1answer
56 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 ...
10
votes
7answers
3k views

LeetCode: Pascal's Triangle C#

https://leetcode.com/explore/interview/card/top-interview-questions-easy/99/others/601/ In Pascal's triangle, each number is the sum of the two numbers directly above it. Example: ...
-1
votes
0answers
42 views

Plus One LinkedList [closed]

Given a non-negative number represented as a singly linked list of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. ...
1
vote
0answers
68 views

Custom Knight dialer solution's time and space complexity

I recently solved the Knight Dialer problem but I'm not quite sure if I got the time complexity right; hence I'm requesting the following: 1) Time and space complexity review and explanation on why ...
4
votes
1answer
85 views

Find minimum number of rooms required

Problem statement is as follows Given an array of time intervals (start, end) for classroom lectures (possibly overlapping), find the minimum number of rooms required. For example, given [(30, ...
1
vote
3answers
66 views

C++ For Euler Problem 3

Here's my solution for Euler Problem 3: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? I'm using the Euler problems to learn ...

15 30 50 per page