Posts

Balacing brackets

Balancing brackets = checking whether every opening bracket has a matching closing bracket in the correct order. Types usually considered: () [] {} Core idea (stack method) Use a stack : Read characters left → right. If opening bracket → push onto stack. If closing bracket → stack empty → invalid top doesn’t match → invalid else pop. End → stack must be empty. Time: O(n) Space: O(n) Example Input: {[()]} Process: { push [ push ( push ) pop ] pop } pop Stack empty → balanced. Python (clean version) def is_balanced(s): stack = [] pairs = {')': '(', ']': '[', '}': '{'} for ch in s: if ch in "([{": stack.append(ch) elif ch in ")]}": if not stack or stack[-1] != pairs[ch]: return False stack.pop() return len(stack) == 0 Edge cases people miss "(]" → order mismatch "((("...

get icons free

Image
As a desingner we often need fee icons for free here are the website which offer few of their assets for free which designers can utilize for desinging their app, website or any other app iconfinder.com Your Heading Your Heading

few latest blogs

These are few latest article links that contribute to tech would 1. Learn in  your free time. 2.  These are few latest blogs and inspiration  1.  google cloud blog   2. 

learn dsa online

Codechief Lean DSA *  DSA code chief problems * https://www.codechef.com/LEARNDSA
choosing correct programming language for your need based on performance. Is there any programming language with good performance and syntax? Fortran vs C++, does Fortran still hold any advantage in numerical analysis these days?