/* ***************************************************************************** * Put each response on the same line as the question, after the colon. * * Operating system: * [ examples are "OS X Ventura 13.5", "Windows 11", and "Ubuntu 22.04" ] * * Compiler: * [ an example is "Temurin 11.0.20" ] * * Text editor / IDE: * [ an example is "IntelliJ 2023.2" ] * * Have you taken (part of) this course before: * ["yes" or "no"] * * Have you taken (part of) the Coursera course Algorithms, Part I or II: * ["yes" or "no"] * * 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 value 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 value 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 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. **************************************************************************** */