Coding Interview
This channel contains the free resources and solution of coding problems which are usually asked in the interviews. Buy ads: https://telega.io/c/crackingthecodinginterview Managed by: @Guideishere12
Ko'proq ko'rsatish- Kanalning o'sishi
- Post qamrovi
- ER - jalb qilish nisbati
Ma'lumot yuklanmoqda...
Ma'lumot yuklanmoqda...
I had fifteen minutes left, and I knew I was going to fail. I had spent two months studying for my first technical interview. I thought I was prepared, but as the interview came to a close, it hit me: I had no idea how to solve coding problems.
Programming Best Resources | Coding Books
Pattern 3: Fast and Slow pointers
The Fast and Slow pointer approach, also known as the Hare & Tortoise algorithm, is a pointer algorithm that uses two pointers which move through the array (or sequence/linked list) at different speeds. This approach is quite useful when dealing with cyclic linked lists or arrays.
By moving at different speeds (say, in a cyclic linked list), the algorithm proves that the two pointers are bound to meet. The fast pointer should catch the slow pointer once both the pointers are in a cyclic loop.
How To Identify
- The problem will deal with a loop in a linked list or array
- When you need to know the position of a certain element or the overall length of the linked list
Questions
- Linked List Cycle (easy)
- Palindrome Linked List (medium)
- Cycle in a Circular Array (hard)
Best DSA RESOURCES: https://topmate.io/coding/886874
ENJOY LEARNING ๐๐Pattern 2: Two Pointers Pattern
Two Pointers is a pattern where two pointers iterate through the data structure in tandem until one or both of the pointers hit a certain condition. Two Pointers is often useful when searching pairs in a sorted array or linked list; for example, when you have to compare each element of an array to its other elements.
How To Identify
- It will feature problems where you deal with sorted arrays (or Linked Lists) and need to find a set of elements that fulfill certain constraints
- The set of elements in the array is a pair, a triplet, or even a subarray
Questions
- Squaring a sorted array (easy)
- Triplets that sum to zero (medium)
- Comparing strings that contain backspaces (medium)
You can check these resources for Coding interview Preparation
All the best ๐๐Pattern 1: Sliding Window Pattern
The Sliding Window pattern is used to perform a required operation on a specific window size of a given array or linked list, such as finding the longest subarray containing all 1s. Sliding Windows start from the 1st element and keep shifting right by one element and adjust the length of the window according to the problem that you are solving. In some cases, the window size remains constant and in other cases the sizes grows or shrinks.
How To Identify
- The problem input is a linear data structure such as a linked list, array, or string
- Youโre asked to find the longest/shortest substring, subarray, or a desired value
Questions
- Maximum sum subarray of size โKโ (easy)
- Longest substring with โKโ distinct characters (medium)
- String anagrams (hard)
Best DSA RESOURCES: https://topmate.io/coding/886874
ENJOY LEARNING ๐๐Joriy rejangiz faqat 5 ta kanal uchun analitika imkoniyatini beradi. Ko'proq olish uchun, iltimos, boshqa reja tanlang.