/* ***************************************************************************** * Operating system: * Compiler: * Text editor / IDE: * * Have you taken (part of) this course before: * Have you taken (part of) the Coursera course Algorithms, Part I or II: * * Hours to complete assignment (optional): * **************************************************************************** */ Programming Assignment 1: Percolation /* ***************************************************************************** * Describe the data structures (i.e., instance variables) you used to * implement the Percolation API. **************************************************************************** */ /* ***************************************************************************** * Briefly describe the algorithms you used to implement each method in * the Percolation API. **************************************************************************** */ open(): isOpen(): isFull(): numberOfOpenSites(): percolates(): /* ***************************************************************************** * First, implement Percolation using QuickFindUF. * What is the largest values of n that PercolationStats can handle in * less than one minute on your computer when performing T = 100 trials? * * Fill in the table below to show the values of n that you used and the * corresponding running times. Use at least 5 different values of n. **************************************************************************** */ T = 100 n time (seconds) -------------------------- ... ... ... ... ... /* ***************************************************************************** * Describe the strategy you used for selecting the values of n. **************************************************************************** */ /* ***************************************************************************** * Next, implement Percolation using WeightedQuickUnionUF. * What is the largest values of n that PercolationStats can handle in * less than one minute on your computer when performing T = 100 trials? * * Fill in the table below to show the values of n that you used and the * corresponding running times. Use at least 5 different values of n. **************************************************************************** */ T = 100 n time (seconds) -------------------------- ... ... ... ... ... /* ***************************************************************************** * Known bugs / limitations. **************************************************************************** */ /* ***************************************************************************** * Describe whatever help (if any) that you received. * Don't include readings, lectures, and precepts, but do * include any help from people (including course staff, lab TAs, * classmates, and friends) and attribute them by name. **************************************************************************** */ /* ***************************************************************************** * Describe any serious problems you encountered. **************************************************************************** */ /* ***************************************************************************** * List any other comments here. Feel free to provide any feedback * on how much you learned from doing the assignment, and whether * you enjoyed doing it. **************************************************************************** */