EppsNet Archive: Java

Competitive Programming: POJ 2663 – Tri Tiling

Description In how many ways can you tile a 3xn rectangle with 2×1 dominoes? Here is a sample tiling of a 3×12 rectangle. Input Input consists of several test cases followed by a line containing -1. Each test case is a line containing an integer 0 <= n <= 30. Output For each test case, output one integer number giving… Read more →

Competitive Programming: POJ 1426 – Find The Multiple

Description Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 200 and there is a corresponding m containing no more than 100 decimal digits. Input The input file may contain multiple test cases.… Read more →

Competitive Programming: POJ 2084 – Game of Connections

Description This is a small but ancient game. You are supposed to write down the numbers 1, 2, 3, . . . , 2n – 1, 2n consecutively in clockwise order on the ground to form a circle, and then, to draw some straight line segments to connect them into number pairs. Every number must be connected to exactly one… Read more →

Competitive Programming: USACO Big Barn

Farmer John wants to place a big square barn on his square farm. He hates to cut down trees on his farm and wants to find a location for his barn that enables him to build it only on land that is already clear of trees. For our purposes, his land is divided into N x N parcels. The input… Read more →

Competitive Programming: POJ 1654 – Area

Description Consider an infinite full binary search tree (see the figure below), the numbers in the nodes are 1, 2, 3, …. In a subtree whose root node is X, we can get the minimum number in this subtree by repeating going down the left node until the last level, and we can also find the maximum number by going… Read more →

Competitive Programming: POJ 2242 — The Circumference of the Circle

Description To calculate the circumference of a circle seems to be an easy task – provided you know its diameter. But what if you don’t? You are given the cartesian coordinates of three non-collinear points in the plane. Your job is to calculate the circumference of the unique circle that intersects all three points. Input The input will contain one… Read more →

Teaching Computer Science: Lessons Learned

We did a programming lab in class . . . before we started, I mentioned several times that Java code that would be useful for the lab was posted on the class website. So it surprised me that several groups got stuck during the lab when they got to the part where the sample code would have been useful because… Read more →

Teaching Computer Science: Exam Tips from the Pros

When I cover something in a review session or study guide, it’s because I know it’s going to be on the test. There were questions during this morning’s test about the workings of several Java methods, all of which were covered in the review session and the study guide. I can’t answer questions like that during the test so if… Read more →

9 Links

Data Structure Visualizations Good Tech Lead, Bad Tech Lead Google Java Style Guide to 12 Disruptive Technologies How to Write a Cover Letter The Landing Page Optimization Guide You Wish You Always Had Selendroid: Selenium for Android UX Axioms by Eric Dahl Yelp’s got style (and the guide to back it up) Read more →