This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # web-scraping wide receiver data | |
| # Imports pandas, requests, and bs4 packages and creates a soup object from the url request response | |
| import pandas as pd | |
| import requests | |
| from bs4 import BeautifulSoup | |
| URL = "https://www.fantasypros.com/nfl/stats/wr.php" | |
| r = requests.get(URL) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Stack; | |
| public class RecreationalSpot { | |
| class Solution{ | |
| } | |
| static boolean recreationalSpot(int[] arr , int n) { | |
| Stack<Integer> b1 = new Stack<>(); | |
| Stack<Integer> b2 = new Stack<>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class RepeatedString { | |
| static long repeatedString(String s, long n) { | |
| long x = n / s.length(); | |
| long remainder = n % s.length(); | |
| long numAs = 0; | |
| long remainderAs = 0; | |
| for (int i = 0; i < s.length(); i++) { | |
| if (s.charAt(i) == 'a') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| import java.math.*; | |
| import java.security.*; | |
| import java.text.*; | |
| import java.util.*; | |
| import java.util.concurrent.*; | |
| import java.util.regex.*; | |
| public class GameOfThrones { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Checker implements Comparator<Player> { | |
| // complete this method | |
| //descending by score, then ascending by name | |
| public int compare(Player a, Player b) { | |
| if(a.score == b.score) { | |
| return a.name.compareTo(b.name); | |
| } | |
| return b.score - a.score; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| import java.util.Map; | |
| public class TwoStrings { | |
| // Didn't pass test case 4 and 5. nto sure why | |
| static String twoStrings1(String s1, String s2) { | |
| char[] c1 = s1.trim().toCharArray(); | |
| char[] c2 = s2.trim().toCharArray(); | |
| for(int i = 0; i < c1.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static int[] rotLeft(int[] a, int d) { | |
| int size = a.length; | |
| int[] b = new int[size]; | |
| /* 1 2 3 4 5 6 | |
| * 2 3 4 5 6 1 | |
| * 3 4 5 6 1 2 | |
| * 4 5 6 1 2 3 | |
| * | |
| * 5 6 1 2 3 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| boolean hasCycle(Node head) { | |
| if(head == null) return false; | |
| Node slow = head; | |
| Node fast = head.next; | |
| while(slow.next != null && fast.next != null){ | |
| if(slow == fast) | |
| return true; | |
| slow = slow.next; | |
| fast = fast.next.next; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| import java.util.*; | |
| public class AsciiLoop { | |
| public AsciiLoop() { | |
| } | |
| private int index; | |