Torn between Swift and c++ also Few other Queries...!

In this forum members can discuss topics about specific programming languages.
Post Reply

Should an electrical undergrad with math apt. and programming consider this as helpful exercise?

Yes
3
75%
No
1
25%
Maybe
0
No votes
Not Specifically related
0
No votes
 
Total votes: 4

Dravidian
Posts: 3
Joined: Sun May 01, 2016 10:16 am

Torn between Swift and c++ also Few other Queries...!

Post by Dravidian » Sun May 01, 2016 10:53 am

Hello guys,
i am fairly new to the site .I use mac and thus i use Xcode also swift, i do know c++/c. and these are the only language that i am little fluent in.
My Question is what language do we need to use to effectively solve the problems and some of the questions i tried were taking a hell lot a time on Playground (Some even hanged).Is it extremely necessary to learn a language like Java or Assembly to solve these problems or the solution the the PE problems is solely based on algorithms that individual develop to solve that problem?I was also wondering the aspects of ProjectEuler Problems, given that i love maths and programming, if i do this will i be able to mention my awards, ranks etc. in my resume?

Also i had tried few question and solved them but was wondering does it always take very long in getting the desired o/p from the programs? (The questions i solved were taking hours , some didnt even were able to compile! lol.. :lol: )

DJohn
Posts: 42
Joined: Sat Oct 11, 2008 11:24 am

Re: Torn between Swift and c++ also Few other Queries...!

Post by DJohn » Tue May 03, 2016 11:57 am

The language you use isn't very important. Some people use one they're already comfortable with, some use Project Euler as a way to learn a new language.

For many problems there's an obvious way of solving them, but this method will turn out to be impractically slow. There is always a clever and fast way of solving them, and that's what you're supposed to find. Problems are designed so they can be solved in under a minute (often much less). If you're using a particularly inefficient language or a very slow computer, it might take a little more, but never hours. If your programs are taking hours, that's a sign that you've missed something important.

Make sure you read the solution threads for the problems you have solved. There's a good chance people will describe methods that you didn't know about, but can apply to other problems.

Dravidian
Posts: 3
Joined: Sun May 01, 2016 10:16 am

Re: Torn between Swift and c++ also Few other Queries...!

Post by Dravidian » Wed May 04, 2016 12:22 am

@DJohn Then what language would you suggest for me to learn for solving ProjectEuler?

vjcinjr
Posts: 5
Joined: Mon Aug 22, 2016 1:35 am
Location: New York, USA

Re: Torn between Swift and c++ also Few other Queries...!

Post by vjcinjr » Mon Aug 22, 2016 1:54 am

I have used Swift to solve the first 60 problems. My reason was to help me learn Swift. My experience: I gave up on using Playgrounds after the first few problems, because Playgrounds are slow and lack dome debugging capabilities I needed. After solving the problem in Xcode, I Archive and run the Command in Terminal to get timings (usually about 40% faster than Xcode, but varies widely). I am finding Swift not quite as easy to code for some of the problems compared to Python. Sorry, I have not coded in C++ in many years so I can not help you much there.
Dravidian wrote:Hello guys,
i am fairly new to the site .I use mac and thus i use Xcode also swift, i do know c++/c. and these are the only language that i am little fluent in.
My Question is what language do we need to use to effectively solve the problems and some of the questions i tried were taking a hell lot a time on Playground (Some even hanged).Is it extremely necessary to learn a language like Java or Assembly to solve these problems or the solution the the PE problems is solely based on algorithms that individual develop to solve that problem?I was also wondering the aspects of ProjectEuler Problems, given that i love maths and programming, if i do this will i be able to mention my awards, ranks etc. in my resume?

Also i had tried few question and solved them but was wondering does it always take very long in getting the desired o/p from the programs? (The questions i solved were taking hours , some didnt even were able to compile! lol.. :lol: )

Post Reply