All Questions
2 questions
5
votes
3
answers
2k
views
Find smallest number of squares that sum to a number
Leetcode problem 279 “Perfect Squares” is:
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...)
I wrote the following solution:
...
8
votes
1
answer
175
views
Reading, processing and counting an array setting limits
Last weekend my teacher asked me to create code to solve a problem:
Giving a dynamic array, we want to pass the array elements from a file. The first number in the file N gives us the array length. ...