Skip to content

Learning DSA - From 100DaysOfCode challenge to Placement Preparation:) [ C++]

Notifications You must be signed in to change notification settings

shivaamm/Coding-Practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSA using C++ Language

This repository contains all the Coding Problems solved by me on different platforms.

  • Find all topic wise questions in different folders :)
  • From Basic to Hard level questions under each topic
  • Problems are from Leetcode and Geeksforgeeks website.
  • Separate folders for CP (Codechef and Codeforces).. All Solutions are not optimised.
  • Possibility that many questions repeat in same folder or under different topic.
  • Multiple Solutions are given for problems (eg. Some problems can be solved using different data-strutures, so multiple solutions are there, maps, sets, brute force, optimised code, etc)
  • ATTENTION!! This repository is not for Important questions.
  • Press "CTRL + K" for quick find using the command palette.

Big O Notation Complexity

Data Structures in Big O Notation

Data Structure Add/Insert Remove/Delete Access/Get Search/Contains Space Complexity
Array O(n) O(n) O(1) O(n) O(n)
Queue O(1) O(1) O(n) O(n) O(n)
Stack O(1) O(1) O(n) O(n) O(n)
HashSet O(1) O(1) - O(1) O(n)
HashMap O(1) O(1) O(1) O(1) O(n)
Singly LinkedList O(1) O(1) O(n) O(n) O(n)
Doubly LinkedList O(1) O(1) O(n) O(n) O(n)
Circular Singly LinkedList O(1) O(1) O(n) O(n) O(n)
Circular Doubly LinkedList O(1) O(1) O(n) O(n) O(n)
Binary Search Tree O(log n) O(log n) O(log n) O(log n) O(n)
Binary Min Heap O(log n) O(log n) O(1) O(n) O(n)
Binary Max Heap O(log n) O(log n) O(1) O(n) O(n)

Sorting Algorithms in Big O Notation

Sort Algorithm Best Average Worst Space Complexity
Selection Sort O(n^2) O(n^2) O(n^2) O(1)
Insertion Sort O(n) O(n^2) O(n^2) O(1)
Quick Sort O(log n) O(log n) O(n^2) O(log n)
Merge Sort O(nlog n) O(nlog n) O(nlog n) O(n)

ERRORS

image

100DaysOfCode

Summary (click here): This will be the repository for C++ topic wise questions, practice questions and DSA :)

Day 1: 4 Codechef questions completed.

Day 2: Array

Day 3: OFF

Day 4: Codechef and STL Vectors intro

Day 5: Vectors

Day 6: Vectors videos and explanation.

Day 7: Break

Day 8: Practiced Coding questions problem solving

Day 9: Coding Questions practice(problem solving)

Day 10: Vectors problem

Day 11: Explored Stacks

Day 12-13: Stacks using arrays [break time] .'. Hackathon time

Day 14: BREAK!!!!!! .................Hackathon finished

Day 15: Vectors and Templates

Day 16: Linked List & Stacks Basic implementation using c++

Day 17:Linked List

Day 18: Vectors Hackerrank

Day 19: Hackerrank problems

Day 20: Vectors and linked list

Day 21: Hackerearth coding contest challenge

Day 22: Earned 5 star on hackerrank C++ badge

Day 23: Hackerrank contest and problem solving

Day 24: Vectors Practice with leetcode questions

Day 25: Leetcode questions( used vectors bool and stack and started using in functions)

Day 26: Leetcode questions (string and functions) Total 7 done

Day 27: Leetcode questions (9 done)(Remove dupliates using unique) Done 12 questions :)

Day 28: Leetcode climbing question, single number(Using XOR ques) learnt new approach [Done 15 questions]

Day 29: Leetcode 17 questions done. Finally (Done 22) completed 1.32% :)

Day 30: Leetcode 23 questions done ((((break time))))

Day 31: Stacks and Linked list understanding using stl (using stl reduces the lines of code and makes it easy to understand the code)

Day 32: Implementation of LL and stacks in Dev c++

Day 33: Theory part of linked list and stacks

END SEM BREAK

Day 34: Back to Coding!! Starting with Leetcode questions

Day 35: Stacks problem solving question on hackerearth

  • Solved another tricky question on hackerearth * Stack game problem partially solved (half test cases passed)

Day 36: Solved One question of stacks on leetcode :)

Day 37: Leetcode question (Stacks topic but solved with arrays)

Day 38: Leetcode stacks easy tag questions(solved one at night)

  • Codeforces solved 3 question

Day 39: Codeforces question (hulk) and leetcode stacks question

  • First codechef challenge (jan 2021 challenge)
  • Solved 2 contest questions

Day 40: Solved 4 questions of div3(1st contest) codechef [Long challenge]

  • Tried 5th question but failed

Day 41: Codechef problems from A2oj ladder (A division problems)

  • Participated in codechef challenge (solved one full question)

Day 42: Studied Stl Maps + Codeforces virtual contest

Day 43: Contest over understood the problem that couldn't solve(used dp approach and 0/1 knapsack problem approach to solve) -> Queues and implementation of queues

Day 44: Leetcode 1st medium question of Queues

  • GFG practice questions

Day 45: Codechef past contest and gfg practice questions :)

Day 46: Linked List implementation and practice questions.

Day 47: Linked list practice questions and codeforces question

Day 48: Insertions and Reversal in singly linked list (C and C++)

  • Solved Leetcode and gfg questions

Day 49: Linked list different platform practice questions

Day 50: Revision day (arrays, stacks, queues, linked list solved questions) [try pen paper coding]

  • Half done

Day 51: Stacks and Queues using linked list and revision of solved questions :)

Day 52: Notes of linked list with pen paper visualizations to under better(questions solved approaches visuals) :)

  • Codechef contest (Couldn't solve any question, will read editorial)

Day 53: Linked list gfg questions and notes for future reference

  • Arrays Strings gfg practice questions

Day 54: Linked list medium level questions, Time Complexity, Bit Manipulations

Day 55: Bit Manipulation Algo, Doubly Linked list(traversal, create, insertions)

Day 56: Doubly lined list (deletions and reversal)[leetcode medium reversal question is really good]

Day 57: Strings questions and linked list medium and hard level questions practice :)

BREAK DAY ** STL MAP AND SET, HASHING INTRO

Day 58: Cicular Linked list(insertions,deletions and practice) and Operating systems

  • reverse and aptitude topic

Day 59: Strings leetcode questions and Linked list hard questions

Day 60: Maps, Unordered maps, hashing practice questions :)

Day 61: Codechef challenge, Maps, Leetcode question(feb)

Day 62: Trees Introduction :)

Day 63: Trees geeksforgeeks questions practice :)

Day 64: Trees leetcode and gfg questions and notes visuals for recursion :)

Day 65: TREES and LINKED LIST REVISION AND PRACTICE QUESTIONS (10 DAYS DRILL)


Range Queries Problems \

Preparation for placement begins...Stopped counting days (Done with Basics)

DS Algo Foundation GFG Course

CS Core fundamentals Aptitude Company wise Questions

July 1st Companies started coming

DATE - SAT AUG 28 PLACED (Now having 2 offers)

Applying for Off-campus opportunities Off campus resume updated -

  • Done with first interview at Google for SDE role
  • Another upcoming interview at Google

Onto new learnings

Welcome Year 2022

  • Going to empty my current To-Do list one by one. - Cleared most of them