Skip to content

Solutions to some standard DSA problems on InterviewBit and LeetCode including SDE sheet solutions

Notifications You must be signed in to change notification settings

sankalp1999/DSA_problems

Repository files navigation

Problem-solving()

This repository contains solutions of some of the problems I have solved on different platforms across the Internet.

  • All problems in Problem_Tree
  • SDE sheet solutions = Latest -> sde_sheet_revision_probs
  • Graph algorithms = Latest -> Graph
  • DisjointSet = Latest -> CF or DisjointSet folder

Check out my Approach to CP in a nutshell if you have interest in Competitive programming.

Mind.push_back(points)

  • Constantly, push throughout your comfort zone. It's recursive.
  • Read the problem statement and constraints carefully.
  • Don't panic, giveup, rush.
  • Work on a paper. Thinking is better on paper.
  • No need to stress. Play.

if(done) Reflection()

Emphasis should be on the thinking process.

:what small changes can I make in order to improve my speed/logic or efficiency in general?

  • Focus on thinking for more time. Try to code after you are clear with the algorithm/logic Debug it if you think it's correct or if it is passing some later test cases. Don't change approach abruptly.
  • Think of some simple logic i.e from scratch initially and not apply any algo design technique directly. When you think from scratch, your previous experience might also help in solving. Later, you can apply other logic and patterns after sometime if implementation does not work. Basically, narrowing down after sometime.
  • Avoid assuming difficulty of question initially. If scores are there, then thats good to estimate.
  • Deep breaths or small breaks (1 - 2 minutes) can help.

try {} catch {Common Mistakes}

  • Being lazy and not thinking properly. Not working on pen/paper
  • Mapping out previous problems to new problems. Solution: think from 1st principles
  • Panicking
  • Changing approach fast when some more checking can help get AC. This is basically hurrying. Try to stick longer and work out on paper.
  • Do not get disheartened by failures/not being able to solve. Analyse your mistakes and move forward
  • Don't run away from stuff you don't like/ basic difficult stuff. You will have to cover them sometime.

BFS(Resources)

Youtube Channels for CP and CI

A small post/article

Meta Coding Interview Style Problem Guide - I had written this for a friend. Might help you also.

Ignore Bookmarks

  1. https://happygirlzt.com/codelist.html
  2. https://kennyzhuang.gitbooks.io/algorithms-collection/content/burst_balloons.html
  3. http://adilet.org/
  4. https://yangshun.github.io/tech-interview-handbook/
  5. https://happygirlzt.com/codelist.html Nice youtube channels coering problems.Questions

https://leetcode.com/discuss/general-discussion/494279/comprehensive-data-structure-and-algorithm-study-guide

Releases

No releases published

Packages

No packages published

Languages