📙
Python Programming
  • Python Programming
  • Installation and Setup
  • Part 1: Basics
    • Variables
      • Primitive Data Types
      • Secondary Data Types
    • Control Flow and Loop
    • Functions
    • Error Handling
    • Decorators
    • Constructor
    • Built-in Functions and Modules
    • Pythonic Code
    • Miscellaneous Functionalities
    • Understanding Checkpoint I
    • Python Problem Practice I
      • Solutions
  • Part 2: Level Up
    • Real Life Application I
    • Real Life Application II
    • OOP Concepts
    • Creating Library
    • Real Life Application III
  • Processing Related
    • Parallel Processing
    • Oreilly - High Performance Python
    • Memory Management
      • Memory Leak
      • String
      • Array
      • Dictionary
    • Ubuntu CPU and RAM
    • Time and Space Complexity
  • Data Structure
    • Data Structure Overview
    • Array
    • Stack
    • Queue
    • LinkedList
    • Hash-table and Hash-map
    • Recursion
    • Binary Tree
    • Heap Data Structure
    • Graphs
      • Python Graph Visualisation
    • Dynamic Programming
    • Problem Solving Techniques
    • Additional topics
Powered by GitBook
On this page
  1. Data Structure

Problem Solving Techniques

PreviousDynamic ProgrammingNextAdditional topics

Last updated 4 years ago

Was this helpful?

CtrlK
  • Two Pointer Method
  • Binary Search Problems
  • Recursion
  • Some Cool Solutions
  • Sum of Digits
  • Bitwise Operations in Python

Was this helpful?

Two Pointer Method

Declare two pointers, one is faster (increment by 2) compared to slower (increment by 1)

  • Find the centre element of a LinkedList

    • When faster reaches the end node, slower one will be at the mid node

  • Check if a LinkedList is cyclic or not

    • If cyclic, then, at one point in time slower and faster pointers will be at the same point

Binary Search Problems

Using while/for loop or using recursion

https://medium.com/techie-delight/binary-search-practice-problems-4c856cd9f26c

Recursion

FEW DEFINITIONS:

Anagram: A word or phrase that is made by arranging the letters of another word or phrase in a different order

Some Cool Solutions

Sum of Digits

Mathematical Solution is brilliant: https://leetcode.com/problems/add-digits/solution/

Bitwise Operations in Python

<< and >>