Getting started with the sport of competitive programming [closed] - computer-science-theory

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
How do you get started with competitive programming and get well versed with various topics in it ?
What all things you can do ?
Get started directly or do some concepts first.

This is a very popular question on Quora, but is generally considered off-topic for Stack Overflow. The best way to use SO for competitive programming advice is to ask specific questions about problems you're having when coding a solution. For example, you might ask how a language feature works. Often you'll find that the question has already been asked.
Here are the 108+ Quora answers to your question: https://www.quora.com/How-do-I-become-a-competitive-programmer
The summary answer is: Get started solving problems. If you have any programming background, which I'm sure you do since you're asking this question, you'll get more benefit from just starting rather than reading a lot first. When you get stuck on something, that's the time to read books or online resources.
If you're having trouble deciding what to start on, here's a suggestion from my blog of how I would get started: http://www.redgreencode.com/about-project-462/

My 2 cents...
Best option is to get registered at the following coding sites..
+ topcoder.com
+ codechef.com
+ hackerrank.com
And, while you hack code here, you can build upon your programming foundation by learning more on
+ Data structures
+ Algorithms
+ Operating system concepts
+ Networking concepts and more ...
You could also start looking at the following books in this area...
+ The Algorithm Design Manual
+ Programming Challenges: The Programming Contest Training Manual
+ Competitive Programming 2

My advice would be to get registered with a Competitive Programming site if you know how to write simple codes in a particular programming language and solve the basic problems(the ones which does not require algorithms or require basic ones).
My suggestion on the choice of site is:-
1)HackerRank:-https://www.hackerrank.com/
Problems are well categorized here.Practice the questions marked 'easy' here followed by a few 'medium' ones.Complete the '30 Days of Coding Challenge' that would give you a good basic idea of the Java language.Also, check other's code and the editorial even if your code passes all the test cases.
2)SPOJ:-
Practice the problems categorized under 'ad-hoc' here.Start by solving the problems which are solved by most people...usually they will be easier.
3)Start implementing basic(or standard) algorithms. It is suggested to read them from Topcoder tutorials or Introduction to algorithms.Also, follow a standard book along with it.Now, practice problems based on those algorithms until you get familiar with them.
4)After you get acquainted with the most common algorithms start competing in coding challenges.Practice makes you better. Try to solve problems from previous contests. Solve as many problem A-s as you can until they give you some trouble. Then move on to B, then C etc.
Hope it helps :)
P.S. Also check the following answer on Quora:-
https://www.quora.com/What-is-the-best-strategy-to-improve-my-skills-in-competitive-programming-in-2-3-months/answer/Sachin-Gupta-6?srid=4gZ6

Related

Can programming tasks be taken over by artificial intelligence? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I was reading an article earlier that suggests 1/3 of us are scared their job will be taken over by robots at some point. At first I was thinking (as robots have to be programmed as well) that we, as programmers, would be safe from this. That brought me to this question.
Would artificial intelligence be capable of performing (advanced) programming tasks or would they always be limited to the level they where programmed at?
What I mean by level is, for example, a scripting language as opposed to a programming language. (Would it be even possible for a scripting language to write and compile software in a programming language?)
This topic was put on hold because the answers would be based on opinions rather than facts. Just for clarity, I am expecting answers that are based on facts. An answer that simply says yes or no would be an opinion based answer, an answer that explains why is based on facts.
Okay, first of all, since you are dealing with the development of programs, it would be better suited to consider this a question based on Artificial Intelligence, rather than Robotics. It's much more simpler to develop programs to write other programs instead of developing a physical entity to type out a program.
AI has developed to such an extent, that simple games can be played much better than what normal humans can do: Wikipedia: Progress in AI.
As of now, development of complex programs is still out of the reach of AI, though it's not far off. Still, for the most part, AI may be used to assist human developers - since it's still not fully developed - rather than replace them altogether.

How "Hello World" works in C [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am searching for a month for blog posts about "how C program works". Most of them go like
Compilers do these things
Linkers do these things
Program is put into memory; and stacks, heaps, etc.
I thought I would first read about how compiler works to understand the flow of the program into the machine. Dragon Book seems to be universally preferred. But truthfully, it's too intensive. I am not good enough now to go through it all.
So I began to read about hardware. But There too, they explain about buses, I/O signals, structure of memory, writing cache-friendly code etc. But with no proper examples.
But still I could not find myself satisfied or being able to completely visualize the process.
2 hours ago I decided to ask this question.(Since I am scared of It might be not useful to SO community, or off-topic question or other down-votable categories) and I did not find out any post relating to this exactly. There was one about "how compiler does the compilation", but the answers showed that it's too broad a question.
My question is this:
I would like to know how, in depth, a C program works. If you cannot tell me explicitly, please redirect me to a book or another post on another website that can give me the answer to this.
I am here until I get a response. If you have any suggestions regarding this post, tell me. And It is not my first language, so please take all my sentences as being soft and polite.
Thanks.
UPDATE:
Along with the accepted answer, there are some very nice links as well as suggestions which give partial answers or the way to proceed further to understanding what I am trying to understand.
The best answer to this question by far comes from the book "The Elements of Computing Systems," by Noam Nisan and Shimon Schocken. This book starts from the simplest possible electronic components, assembles them into a working processor, invents a simple assembly language for it, writes an assembler for that, and ultimately shows you how high-level languages can be compiled onto it. Reading the book, and working all the examples (which use a simulator for the hardware, so no workshop required!), will forever change the way you look at computers; he will literally understand everything from the lowest to the highest levels, and see how they work together. See the book's website for more info.
It's too broad a question (as you have observed).
If you really want to understand from bottom up - buy an OLD computer from the 80's off ebay. Sinclair Spectrum/BBC it really doesn't matter but make sure you get plenty of books and manuals that go with it.
You will learn plenty because these machines were well documented and what wasn't documented was discovered and then documented :)
They are also sooooo much simpler than a modern quad core multi-gigabyte memory job. It will all fit inside your head easily
or for a modern start, Arduino or Raspberry pie maybe.

I am looking for an advice for best practice in developing coding skills in C# [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I am relatively new with C#. Obviously, I need to improve my programing skills in C#. I mostly working in WPF and have often need to write converters and dependency properties. I had a fast experience programming in Actionscript. However, programming similar logic in C# is quite different, especially when it comes to syntax. I realize that I need to expand my knowledge of C# and improve my understanding of the syntax in order to become more comfortable with C#. I am wondering if someone can advise what will be the best methodology to feel this gap and any good web based sources or books that you know. Thank for your help.
here are some resources that will help u
http://weblogs.asp.net/lhunt/pages/CSharp-Coding-Standards-document.aspx
and check that thread at Are there any suggestions for developing a C# coding standards / best practices document?
Do let us know if u neeed more
From your question it is not clear really how much experience and knowledge you have got so far. We have got programming skills and we have C#/.NET skills and we have WPF skills, each different.
1) Programming skills: you need to have firm grasp of programming techniques, OOP, algorithms, design patterns.. but you probably will acquire that along the way.
2) C#/.NET skills: Solid understanding of C# object, array, delegate, variable, reference type value type, generics, ... you might already have that knowledge but if not there are many good books around just buy or borrow one
3) WPF: Just get WPF unleashed book by Adam Nathan. And learn MVVM or MVVM lite.
I've found that www.blackwasp.co.uk has pretty much all the tutorials one could ever need for getting proficient with C#.
If you want to make a purchase, for your C# fundamentals, you couldn't do better than Head First C#. (Reminder: with this or any technical book, as soon as you get it, go to the book's official website, print out the errata, and keep that with the book.)
C# fundamentals for free: check out C# Station's C# Tutorial. It's pretty good but their section on polymorphism is weak. Also, haunt C# questions on Stack Overflow and see how other people use it.
For WPF, check out Sacha Barber's "WPF: A Beginner's Guide." Here is Sacha's article listing. The organization is lacking so just search that page for "WPF: A Beginner's Guide" to find each successive part.

Best online source for learning C [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Im an experienced actionscript developer, and relatively new to Objective C.
I decided a good investment of my time would be to master the C language (not C# or C++).
Can anyone recommend the 'best' online tutorials for learning C?
You won't have difficulties understanding the C syntax given your past experience, and unfortunately, most tutorials and introductory books will focus on it much more than they should.
C is full of traps, but it is a simple language which gives you full control on what is going on with your programs. However, it is difficult to master. You will need something more elaborated than a simple tutorial which will be half full of things you probably already know.
I definitely recommand K&R's book if you want to learn the language correctly. Be sure to grab the second edition.
I agree with James' comment, though I would recommend looking over the first paragraphs of a web based tutorial.
Though they're not the best for learning the language itself, you can get a feel for some trivial programs and see if they fit your brain.
The worst thing that can happen here is if you buy a book and can't use the language (for whatever reason).
As far as specific selections... I can't give you any.
As you've asked for online resources only, so here is one
http://www.cprogramming.com/tutorial/c/lesson1.html
Like Alexandre , I would also recommend K & R's book
You should check this out too:
http://www.phy.duke.edu/~rgb/General/c_book/c_book/index.html
I've looked through it, it's got some good examples and it's a good read.

C Problems and Solutions [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a series of C problems (with solutions) that I can use to build my C skills. I already understand the basics of the language, the syntax, and the semantics. I am looking for a series of problems that will help me hone my skills, not a set of simple questions that you'd see in an introductory programming class.
You might try solving some of the problems on Project Euler. The first few are pretty simple, but they get very challenging very quickly. I think it's a lot of fun trying to come up with the shortest code or highly optimized code to compute the results (though, I generally use C++ or Python, not C).
One advantage the Project Euler problems have is that they aren't just language-centric; they're problems that really make you think hard about how to develop an elegant solution to difficult problems.
And don't forget code-golf.
You probably want to respond only to challenges (questions) that have at least 10 upvotes.
Here is a list of sites with online judges (and similar) which contains a large variety of problems:
(The sites are sorted in lexicographical order)
ACM Live Archive, problems from past ACM/ICPC regionals and World Finals.
Arbiter, online judge at Sharif University in Iran.
FZU Online Judge
Google Code Jam
Harbin Online Judge
Hangzhou Dianzi University (HDU) Online Judge
Hunan University ACM/ICPC Online Judge
IPSC (Internet Problem Solving Contest)
KSRU Online Judge
10.Jilin Online Judge
11.Lviv Online Judge
12.Moscow Online Judge
13.National Taiwan University Online Judge
14.Online Problems Solving System (OPSS)
15.Peking University Online Judge
16.Programming Challenges
17.Project Euler
18.Saratov Online Judge
19.Sphere Online Judge
20.TJU Online Judge
21.TopCoder
22.Ural Online Judge
23.USACO Training Program Gateway
24.UVa Online Judge
25.Wuhan University Online Judge
26.ZJU Online Judge
27.Z-Trening
Build libraries that implement sophisticated data structures, like binary trees, dictionaries, and such.
Write a compiler. It doesn't need to be complex or even complete: you can make up a simple language (a subset of lisp?) and then write a lexer for it. Make sure you start by laying down the formal grammar. You will touch memory management, pointer arithmetics and other neat C stuff.
I learnt a great deal about automata and compiler-design by writing a simple YAML parser in C++.
Try out Dennis Ritchie's book on C programming language. The book has quite good problems and also reading it is a joy :)
For more challenging problems you can go to Bitwise Programming contest
Ruby Quiz has 156 problems with solutions. But in Ruby, not C. See the ruby-lang mailing list for more after James stopped being Ruby quiz master.
Knuth's repository of bitwise stuff might help in the noble pursuit :)
http://www-cs-faculty.stanford.edu/~knuth/fasc1a.ps.gz
Practice code Katas, language does not matter that much. Trying to solve Katas you allready did with another language is usually quite efficient to learn a new language.
You could always visit Freshmeat, find a few projects that interest you and look at their bug tracker. Grab the code and try to fix a few of the problems.
This helps open source while also helping you to get used to jumping in to someone else's code with debugging goggles on.

Resources