Skip to content

Instantly share code, notes, and snippets.

View johnoyegbite's full-sized avatar

John Oyegbite johnoyegbite

View GitHub Profile
@johnoyegbite
johnoyegbite / TicTacToeNbyN.java
Created January 1, 2021 19:52
N by N Find Winner on a Tic Tac Toe Game
import java.util.*;
import java.lang.Math;
class Solution {
public int countOnesIn(String str) {
int count = 0;
for(int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if(c == '1') {
count += 1;