Posts

Showing posts from March, 2017

What programming languages do what?

Here is the list of computer programming languages and their use: Java - the general-purpose enterprise standard heavily used for server-side web development; used to write Android appsPython - general-purpose scripting language, popular for numerical computing, financial industry, web development, etc.PHP - used for server-side web developmentC# - general-purpose and largely Windows-centricC++ - general-purpose and high-performance; used for nearly everything, esp. financial industry, scientific computing, game developmentC - used for writing operating systems, device drivers, embedded

Which Linux distribution is the best for a programmer?

Image
You need to specify what sort of engineering: Software engineering/IT/Web—you’re better off sticking with Debian, Ubuntu, or RedHat/CentOS if you want to use the computer to write your own software and/or manage commonly-used platforms without constantly tweaking with the guts of it. Computer Engineering/System Programming—use a source-based distribution like Gentoo, Slackware, or Linux From Scratch.

How do I learn data structures and algorithms from scratch?

Learn Big-Oh notation, omega and theta notations denoting complexity of algorithms and data structures.If you don’t know, learn some discrete mathematics and probability. Learn basic combinatorics, graph theory, matrices, probability theory, especially the concept of expected values. Do this on the fly.Learn basic data structuresImplement singly and doubly linked lists on your own.Learn stack and queue. Implement them using linked lists. For more fun - try implementing stacks and queues using arrays.Implement vector data structure in C++ on your own. It is simple - when you run out of space, allocate twice the memory you had allocated previously and copy all the data to newly allocated array.Implement binary heap data structure and use it as priority

What to use endl or "\n"

The difference between std::endl and '\n' is that std::endl actually flushes the stream. This can be a costly operation in terms of processing time, so it's best to get in the habit of only using it when flushing the stream is actually required.

You may also like:
C++: Basic Data Types
C++: Functions -1
C++: Implementation of Quicksort
C++: Implementation of Heapsort
Cool Websites you don't know about...

How do I improve my logical thinking and problem solving skills?

Here are some of the steps that one can take to build on to the  skill.


The core activitiesFocus and attention: When you face a problem, give it your full focus. Think only about the problem and forget everything else.
Suspect your memory: While memory may be good for various tasks but when it comes to logic, memory is a bad master. Scrutinize your memory and don't trust it completely.
Avoid multitasking: You cannot do two logical thinking activities at once. 
Diagrams are your savior: Always use paper and pencil, draw flowcharts, boxes, circles, to represent logic. Since you have not used your left-brain that much, you will use your right-brain to wake up your left-brain. After you have developed sufficient skills you will be able to do much of this stuff mentally.
Read good books: Find books on logical reasoning, which promises to build the skills  from ground up. Never try to master too much at once, take is slow and steady.
Take online tests: Find some good online tests e.g. Online…

How do I learn competitive programming as a beginner?

Image
Here is a step by step procedure. Some of it can/should be done in parallel. Learn a subset of C++. In Ubuntu, the compiler g++ is already available and if are using latest version then it also supports C++11 and C++14 standards. Use them. Some features make your life very easy. You don’t need to learn about Object-Oriented programming features like classes, inheritance, constructor, destructor etc. You may not even need to learn about templates although they are quite interesting. Think of it as enhanced C.Learn STL - Standard Template Library in C++. It contains implementation of commonly used routines like sort, searching - both linear and binary searching, data structures like vector, linked list, set, map etc. THIS IS VERY IMPORTANT.Learn discrete mathematics, data structures and algorithms - Start from the basics and learn them RIGOROUSLY if you want to become a red coder. Your foundations should be solid. Buy “Introduction to Algorithms” [CLRS] (Yes. Buy it. It is worth the mone…