/* ***************************************************************************** * Operating system: * [ examples are "OS X Ventura 13.2", "Windows 11", and "Ubuntu 22.04" ] * * Compiler: * [ an example is "Temurin 11.0.18" ] * * Text editor / IDE: * [ an example is "IntelliJ 2022.2" ] * * 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 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. **************************************************************************** */