### Jatin Thakur

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

1

Add a comment...

Start a hangout

Jatin Thakur

Works at Barracuda Networks

Attended SRM University

Lives in Bangalore

AboutPostsPhotos

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

1

Add a comment...

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

+Suyash Bhalla

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

+Suyash Bhalla

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

1

Add a comment...

+Avichal Sharma 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!

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

1

4 comments

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

PrintWriter : 140ms

System.out.println() : 760ms

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

PrintWriter : 140ms

System.out.println() : 760ms

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

Add a comment...

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

1

10 comments

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

Add a comment...

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

Add a comment...

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

Add a comment...

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

(SCC/Kernel DAG/Kosaraju's Algorithm)

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

(Dijkstra's Algorithm)

+Avichal Sharma 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.

(SCC/Kernel DAG/Kosaraju's Algorithm)

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

(Dijkstra's Algorithm)

+Avichal Sharma 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

2 comments

+Avichal Sharma

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!

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!

Add a comment...

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

+Avichal Sharma 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.

+Avichal Sharma 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

Add a comment...

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

Add a comment...

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

Add a comment...

Collections Jatin is following

View all

Work

Occupation

Software Development

Skills

Algorithms, Java, C++, R, Machine Learning

Employment

- Barracuda NetworksSoftware Engineer, present

Places

Currently

Bangalore

Previously

Delhi

Links

YouTube

Contributor to

- codebytes (current)

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 UniversityComputer Science and Engineering, 2012 - 2016

Basic Information

Gender

Male

Birthday

February 28, 1995