Post an algorithm interview question, solve the others.
>(1) >In any language, write a function that tests whether a string contains square square brackets that are nested properly. >In other words, for every opening bracket there should be a corresponding closing bracket, with no improperly nested brackets between. >Bonus: Do multiple types of brackets: < [ ( {
>(2) >In Python, write a function that takes a string and parses it into nested lists, based on the square brackets. >You can assume that the square brackets match up appropriately.
Thomas Murphy
>Impossible Challenge: >Do problem (2) in C++.
Thomas Cooper
Ive recently started applying for jobs n because of my projects ive been getting a ton of interviews for entry level stuff(web dev, jr software, small company software engineer)
So far ive passed every coding challenge no matter the language
HERE ARE MY TIPS FOR succes
Ive been praticing on codewars, i try to figure out the problems thn either give up or look at the correct answer n try to understand every part of it, dont spend more thn 20-30mins per problem
2. Once uve gotten the interview go on glassdoor n search for tht company n look at the vompanies interview question. 9/10 times the question thyll ask u will be there or some form of it.
3. Once uve gotten the interview.Look the companies job listing th u applied to. Look at the tech they listed and thn research why should I use X tech/languague, benefits and cons/ additionally whats a better interview. Often times ull be ask "so u listed ur proficient in X tech/languague which is what we use care to tell us why u use it" You can now answer with X "tech is great for this and this," (if you found something new tht is way better or can help out) u can say "even though x tech has this con I read/heard Z tech can help with said problem
Grayson Sanchez
I clicked this because anime.
Evan Stewart
>write a program that iterates over a range of numbers and print: >"Fizz" if the number is a multiple of 3 >"Buzz" if it's a multiple of 5 >"Pop" if it's a multiple of 7 >"Whack" if it's a multiple of 11 >"FizzBuzz" if it's a multiple of 3 and 5 and continue this pattern for all other combinations
Asher Sullivan
(1) >map each instance of {, [ or ( (and also }, ], )) into 0, 1, 2 respectively >construct the vector with 0's, 1's and 2's corresponding to the order the brackets appear in the string >check if the vector is a palindrome (2) >in Python No.
(1): Given a decorated 3-cobordism M, let \lambda_+/- be the Lagrangian subspaces of the homology spaces H_1(\partial_+/-M,R) that are the kernels of the inclusion homomorphisms H_1(\partial_+/-M,R) → H_1(M,R). Write out a pseudocode that computes the Maslov index \mu(\lambda_+,\lambda_-,\lambda(M)) of the decordated 3-cobordism M. (2): Given a semisimple ribbon category V with ground ring (field) C and normalization k = 1 where k is the anomaly, write a pseudocode that implements the Verlinde-Selberg formula to calculate the operator invariant F(H_{ij}) of the Hopf link H_{ij}.
Isaiah Baker
your grammar makes me want to kill myself
Wyatt Ross
nesting doesn't mean symmetrical you could have something like this:
[ [ [ [a] ] ] [b] ]
which would be valid, but not a palindrome. > not liking Python No wonder you are an idiot.
Blake Gomez
We're not really interested in hiring you, good luck with your programming though.
Ian Green
So just a crazy bunch of nested if-statements?
Ryder Miller
def checkBrackets(brackets): myStack = [] i = 0 while(i < len(brackets)): if brackets[i] in "" and myStack[-1] == "
Easton Moore
int bchk(char *str) { int c=0; for (int i=0; i
Connor Thomas
Don't call us, we'll call you.
Lincoln James
Aside from the default which is a waste of 2 lines, good job very elegant
Kevin Butler
bunch of independent if-statements concatenate a string if the condition meets
s = '' if n % 3 == 0: s += 'Fizz' if n % 5 == 0: s += 'Buzz' ...
Liam Gonzalez
string = gets.chomp string.chars.to_a! left_count = 0 string.each do |c| if left_count < 0 puts "Mismatched brackets" exit end left_count++ if c.eql? '[' left_count-- if c.eql? ']' end if left_count != 0 puts "Mismatched brackets" exit end
Jordan Edwards
>chomp >puts >eql
Huh, so that's Ruby.
Aiden Lewis
i swear to god Sup Forums is the most arrogant board on this site you're all neets/pajeets but post shit like this