Rippling interview question

standard LC medium to hard