Kotlin, originated at JetBrains in 2010, is a general purpose, open source, statically typed “pragmatic” programming language for the JVM and Android that combines object-oriented and functional programming features.
Kotlin is now an official language on Android. It's expressive, concise, and powerful. Best of all, it's interoperable with existing Android languages and runtime. Kotlin code is safer and more concise than Java code, and Kotlin and Java files can coexist in Android apps, so that Kotlin is not only useful for new apps, but also for expanding existing Java apps. It contains safety features for nullability and immutability, to make your Android apps healthy and performant by default. Also, Kotlin has all of the features and advantages of a functional language.
Google announced official support for Kotlin on Android at Google I/O 2017, and starting with Android Studio 3.0 Kotlin is built into the Android development toolset.
Advantages of Kotlin:-
Java Interoperability: Kotlin is 100% interoperable with Java. You can literally continue work on your old Java projects
using Kotlin. Leverage existing libraries of JVM, android and the browser.
Familiar Syntax: Kotlin isn’t some weird language as its syntax is familiar to any programmer coming from the OOP
Type Inference: Kotlin will infer your types wherever you feel it will improve readability.
Smart Casts: The Kotlin compiler tracks your logic and auto-casts types if possible.
Concise: Drastically reduce the amount of boilerplate code.
Default Arguments: No need to define several similar methods with varying arguments.
Named Arguments: Combined with default arguments, named arguments eliminates the need for builders.
Tool friendly: Choose any java IDE or build from command line.
Operator Overloading: A predefined set of operators can be overloaded to improve readability.
Null Safety: Kotlin resolves this by distinguishing between non-null types and nullable types and avoid entire classes of
errors such as null pointer exception.
To begin your journey for Competition programming, below are some tips which would help to get into the competition programming.
Learn a programming language(like C,C++,JAVA etc) you are going to use in all competitions. C++ is predominant in programming contests and competitions because of its speed, available data structures / algorithms in STL library and because all the competitions support it.
Participation and practice is the ultimate mantra. Start with easy problems then move on complex problems and topic wise problems. Also check initial submissions of good coders and editorials, this will make you learn a lot.
Avoid time limit exceeded error, always consider worst cases before you start coding. Do proper order analysis of your solution because sometimes a little optimization is to be done but sometime there is a need of totally new and efficient algorithm.
Must learn works, proof, code and analysis of basic and well known algorithms. A book “Introduction to Algorithms”, written by Cormen, is considered Bible on this topic. Some of the well known algorithms to be worth of learning are-
Sieve of Eratosthenes, or another prime number sieve
Either Kruskal's or Prim's algorithm
Some implementation of topological sorting, such as by using DFS
Convex hull (like Monotone Chains algorithm)
Edmonds--Karp, or another implementation of the Ford--Fulkerson method; or a preflow-push algorithm; or
To get good at writing fast codes and improving your implementation follow this:
On Topcoder, start with Div2 250 master it then start with Div2 500 master it then move to Div1 250. Meanwhile keep learning algorithms and keep practicing them on SPOJ or Codechef or Codeforces . And do read the tutorials, after a time you will realize that the tricks and methods to solve are repeating themselves.
Important Topics for that subject to read along with Chapter Subparts :
Function K N King Chapter - 9 : 9.1, 9.2 / Dennis Ritchie : chapter 4 - 4.1, 4.2
Recursion K N King Chapter - 9.6 / Dennis Ritchie : chapter 4 -4.10
Parameter Passing K N King Chapter - 9.3 , 9.4, 9.5 / Dennis Ritchie : chapter 1- 1.8
Scope K N King Chapter - 10: 10.1 to 10.4 / Dennis Ritchie : chapter 4 -4.3 to 4.7
Binding K N King Chapter - 10.5 / Dennis Ritchie : chapter 4 - 4.8 , 4.9
Pointer K N King Chapter - 11: 11.1 to 11.5 , Chapter 17 : 17.1 to 17.8 / Dennis Ritchie : chapter 5 - 5.1 to 5.5
Array - 1D array K N King chapter 8 - 8.1 , 2 D Array 8.2 , 8.3
Pointers and Arrays K N King Chapter - 12: 12.1 to 12.5 / Dennis Ritchie : chapter 5 - 5.6 to 5.9
3 . Types of problems from where questions came in previous years :
C programming Questions are logical and mostly based on finding outputs which contain some pointers, static variables, arrays, strings, functions etc.
Important Topics are:
Array- 1D and 2D Array
Array- row and column major order
memory location sums
1D, 2D array location sums
moving no of memory locations based on given program
pointers and arrays
pass-by-value, pass-by-pointer/ reference
short circuit rule
array to pointer conversion on function call
scope : - static and dynamic scoping,
parameter passing .
A small NOTE for GATE Exam purpose ---> "C" is included in GATE syllabus as one language for checking programming compatibility- not to see if a student is master in C. For the same
reason, GATE COMMITTEE don't ask questions related to C library functions or anything too specific to C. So, GATE C portions are always from a small subset of C.
The best way to practice C programming question is take questions from previous year Gate papers and try to solve them and try to do programming on Compiler.
It will increase your skills and accuracy.