## Profile

Jatin Thakur
Works at Barracuda Networks
Attended SRM University
Lives in Bangalore

## Stream

### Jatin Thakur

Shared publicly  -

Suppose you have a file like this: You need to get this output: , you can use this awk code:
1

### Jatin Thakur

Shared publicly  -

There will be a new type of "interactive" problem in this contest. You might want to solve this before the contest begins

http://codeforces.com/gym/101021/problem/A﻿
1

### Jatin Thakur

Shared publicly  -

I was trying to solve this problem http://codeforces.com/contest/659/problem/F for like hours, getting TLEs.

Used PrintWriter instead of System.out.println() for writing output and got AC!﻿
1

http://codeforces.com/contest/658/problem/C

PrintWriter : 140ms
System.out.println() : 760ms

System.out.println() can cost you a TLE in some problems.﻿

### Jatin Thakur

Shared publicly  -

Reaching even a yellow rating is not that easy. We need to practice a lot more. Let's see where we end up.﻿
1

There isn't any specific group, but you're welcome to discuss any problem.﻿

### Jatin Thakur

Shared publicly  -

KMP Substring Match Algorithm (LPS array/Multiple Occurences) - Java﻿
There is another implementation that uses 2D array for transition table of a DFA. Link Read this first : http://www.geeksforgeeks.org/searching-for-patterns-set-2-kmp-algorithm/ Example case: text: aaabacaabaazq pat : aabaax ...
1

### Jatin Thakur

Shared publicly  -

SPOJ BTCODE_H (Maths) Solution - Java﻿
Test Case given- N = 2, K = 2. No of words containing only 0 and 1 that are of length 2 -> 4 00 01 10 11 Now insertion of words may happen as: 00 00 00 01 01 00 00 10 10 00 00 11 ...
1

### Jatin Thakur

Shared publicly  -

Modify your linux prompt to make it look nicer.﻿
1

### Jatin Thakur

Shared publicly  -

Tomorrow. 10 PM.

Register

http://codeforces.com/contests/679,680

​﻿
1

### Jatin Thakur

Shared publicly  -

http://www.spoj.com/problems/TOUR/
(SCC/Kernel DAG/Kosaraju's Algorithm)

http://www.spoj.com/problems/INCARDS/
(Dijkstra's Algorithm)

Try these. I found them quite interesting.

http://www.spoj.com/problems/MUL/

This one would have been somewhat lengthy to solve if Java/Python weren't allowed.﻿
2

http://codeforces.com/contest/659/problem/D

This problem has an O(1) solution (wow!). I solved it in O(n). Check it out.

http://codeforces.com/contest/659/problem/E

Easy, once you know the trick!﻿

### Jatin Thakur

Shared publicly  -

SPOJ PSTRING (KMP + DP (Recursive)) Solution C++

Solved it. My solution took 0.50s/40MB though. Got Out of Memory error in Java. Had to write it in C++. The best solution is 0.06s/3MB. Give it a try.﻿
Problem : www.spoj.com/problems/PSTRING Algorithm : 1. Compute KMPs DFA. 2. Apply DP. i) Either include a character or skip it. ii) Skip a character if it leads to a full substring match. Code: #include <iostream> #includ...
1

### Jatin Thakur

Shared publicly  -

ARDA1 SPOJ (Bruteforce / KMP) Solution C++﻿
Bruteforce / KMP With bruteforce - 0.01s With KMP - 0.17s Solution (Bruteforce): #include <stdio.h> #include <string.h> #include <vector> using namespace std; char s[301][301]; char world[2001][2001]; int main...
1

### Jatin Thakur

Shared publicly  -

TAP2012D SPOJ (Trie with HashMaps) solution Java﻿
You need to put all the names first and second team players in the same trie. If your logic involves putting the names of team1 into trie and then using team2 player names, you're likely to get WAs. For eg. changing the order...
1
Collections Jatin is following
View all
Work
Occupation
Software Development
Skills
Algorithms, Java, C++, R, Machine Learning
Employment
• Barracuda Networks
Software Engineer, present
Places
Currently
Bangalore
Previously
Delhi
Contributor to
Story
Introduction
I love writing code.
I like solving algorithmic challenges.
I find ML concepts interesting.

My website -

Bragging rights
I never give up.
Education
• SRM University
Computer Science and Engineering, 2012 - 2016
Basic Information
Gender
Male
Birthday
February 28, 1995