Showing posts with label TopCoder. Show all posts
Showing posts with label TopCoder. Show all posts

Monday, September 7, 2015

Flood Fill : grafixMask – SRM 211 Div 1 from Topcoder

Here I was practicing the "Flood Fill" approach to solve a problem. For details, see below.

https://www.topcoder.com/community/data-science/data-science-tutorials/how-to-find-a-solution/#floodfill

Problem

This is the problem statement.
http://community.topcoder.com/stat?c=problem_statement&pm=2998&rd=5857

My Approach

Since this is a solvable problem with the "Flood Fill", I used BFS to search all reachable cells from every coordinate.

Here is my practice code at Github..

https://github.com/emoken/topcoder-study/blob/master/src/main/java/TopCoder/SRM211_DIV1/GrafixMask.java

Bit Manipulation

Tutorials

Sample Problems

Below are all very good practice problems to use bitwise operation from TopCoder problems.I put a link to my coding for those problems. Any questions and/or comments are welcome!

Problem Statement for FactoryCounting

TCCC06 Online Round 1B - Division I, Level Two
http://community.topcoder.com/stat?c=problem_statement&pm=6725&rd=10100

Problem Statement for EllysCheckers 

Single Round Match 534 Round 1 - Division I, Level One 
http://community.topcoder.com/stat?c=problem_statement&pm=11791&rd=14727&rm=311688&cr=22859464

Problem Statement for RabbitStepping 

Single Round Match 475 Round 1 - Division I, Level One 
http://community.topcoder.com/stat?c=problem_statement&pm=10878&rd=14156

__END_OF_ENTRY__

Self Check My Own Program

These are my memorandums to diagnose my program for the competition.

Memory Usage

How to Check Memory Usage in Java.
http://www.quora.com/What-is-the-simplest-and-most-accurate-way-to-measure-the-memory-used-by-a-program-in-a-programming-contest-environment

Performance

xxx

__END_OF_ENTRY__

Study Planning for Programming Competition

Training Guidelines:

  1. Getting started in sport of programming
    https://docs.google.com/document/d/10pw2WJDECopU3JgvZ6DEFQ8flBgNGw9f7SWmR2gYP_w/edit
  2. How should I practice so that I will be at a level where I can approach TopCoder's Div1-500 problems with confidence?
    http://www.quora.com/How-should-I-practice-so-that-I-will-be-at-a-level-where-I-can-approach-TopCoders-Div1-500-problems-with-confidence

Training Materials:

  1. Data Science Tutorials
    https://www.topcoder.com/community/data-science/data-science-tutorials/
  2. Algorithms (4th Edition) 4th Edition by Robert Sedgewick, Kevin Wayne
    http://www.amazon.com/Algorithms-4th-Edition-Robert-Sedgewick/dp/032157351X
    http://books.rakuten.co.jp/rk/1efb7f8c73564f1093db84e496a15660/

    Source code location (Java Algorithms and Clients):
    http://algs4.cs.princeton.edu/code/

Personal Note: