Skip to content

Instantly share code, notes, and snippets.

View saayv1's full-sized avatar
🤕

Vyaas Shenoy saayv1

🤕
  • Sunnyvale, CA
View GitHub Profile
@saayv1
saayv1 / gist:8eae483e6d4be2763bf1642ce4ac7523
Created February 13, 2023 08:50
Vyaas's solution to Cassidoo's interview question of the week of Feb 13 2023
/*
* Cassidoo's interview question of the week of Feb 13 2023
*
* Author: Vyaas
*/
package main
import "fmt"
func main() {
import java.util.*;
class MarkdownFormatted {
private void format(String input) {
String[] newLineStrings = input.split("\n");
ArrayList<ArrayList<String>> words = new ArrayList<>();
int size = newLineStrings[0].split("\\|").length;
int[] largest = new int[size];
@saayv1
saayv1 / validParantheses.java
Created August 16, 2022 19:44
cassidoo-interview-question-august-14
class Solution {
public int longestValidParentheses(String s) {
ArrayDeque<Integer> stack = new ArrayDeque<>();
int max = 0;
stack.push(-1);
for(int i=0;i<s.length();i++) {
if(s.charAt(i) == '(') {
stack.push(i);
} else {
stack.pop();
@saayv1
saayv1 / bash-cheatsheet.sh
Last active August 14, 2017 15:09 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec and Vyaas
# Date: 2014/11/04