0% found this document useful (0 votes)
20 views38 pages

Talk - Cci 2024

Uploaded by

shahfaisal gfg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views38 pages

Talk - Cci 2024

Uploaded by

shahfaisal gfg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Instructor’s Bio

Sarfraz Raza is a seasoned academic with extensive experience teaching


computer science courses at various prestigious institutions, including ITU
and FAST-NUCES.

As CEO of Seed Programming, my objective is to provide access to


high-quality education: integrated learning experiences that connect
critical thinking, creative problem-solving and practical design and
programming skills to prepare students for real-world challenges.

CEO Seed Programming

SarfrazRazaOfficial Sarfraz Raza


Vision
We envision a future where young learners from all
backgrounds have equal opportunities to excel in computer
science education.
Mission
For School / College Students: Empowering Future Innovators with
Coding Superpowers
Through engaging and interactive learning experiences, we unlock the
creative potential, problem-solving abilities, and confidence of students.
Our aim is to equip them with essential coding skills, preparing them to
thrive in any field they choose in the digital age.

For University Students: Laying the foundation for lifelong learning and
success in computer science, machine learning and related fields

We equip university students with a coherent conceptual framework,


critical thinking skills, foundational academic knowledge and practical
skills in the core tools and technologies in use in the industry. Our goal is
to empower our students with the expertise and confidence needed to
excel in their careers and make meaningful contributions to the industry
WhatsApp Group

SP-CCI@umt
Cracking the Coding Interviews
WhatsApp Group

SP-CCI@umt
Why?
you need to prepare for your interviews? and how?
Why?
Cracking the Coding Interview?
Your Competition - Arbisoft 2023 Statistics

Only around 50 were hired!!!


Brainstorming ⇒ Articulation
Brainstorming ⇒ Articulation

Ready for a challenge?


😎
Brainstorming

Challenge 1a - with Memory constraints

Design and Implement an algorithm to


determine if a read-only string has all unique
characters.
Brainstorming

Challenge 1b - Can you make it more efficient!

Design and Implement an algorithm to


determine if an editable string has all unique
characters.
Brainstorming

Challenge 1c - Do anything for efficiency!

Design and Implement an algorithm to


determine if a string has all unique characters.
You may use any extra data structure?
Brainstorming

Challenge 2 - Check Permutation


Given two strings, write a method to decide if one is a permutation of
the other

bool isPermutation(string s1, string s2)


Topics you must stand firm upon
Let’s look at them one by one
1: The Foundation Test

Array Based Problem Solving

Brainstorming Problem Solving Strategies


■ Array processing: Sorting, Segregation,
Merging
● Two pointes approach
■ Sorting based searching
■ Prune and Search
■ The use of basic data structures
● with array, stack, queue, vector
and deque)
1: The Foundation Test

Array Based Problem Solving

Brainstorming Problem Solving Strategies Knowing your tool kit


■ Array processing: Sorting, Segregation, ■ Articulating your thought Process
Merging ■ Knowing what is efficiency - Time
● Two pointes approach Complexity
■ Sorting based searching ● asymptotic vs practical
■ Prune and Search
■ The use of basic data structures
● with array, stack, queue, vector
and deque)
2: Object Oriented Programming

■ Abstraction
■ Encapsulation
■ *this pointer
■ Object relations
● Composition, Aggregation, Association
■ Class level relation
● Inheritance
● Polymorphism: How Polymorphism is achieved? Hint: VTable
■ Making big designs
● Building Chess, Ludo, … in your CV
3: Recursive problem solving

■ What is Recursive thinking?

■ Building the recursive algorithms.

■ Bruteforce Navigation through search space

■ Time Complexity Analysis of Recursive programs


3: Recursive problem solving

Problem: Given a “2 x n” board and tiles of size “2 x 1”, count the


number of ways to tile the given board using the 2 x 1 tiles. A tile
can either be placed horizontally i.e., as a 1 x 2 tile or vertically i.e.,
as 2 x 1 tile.
4: Problems Strategies with Linked Structures

Dynamic Recursive Linked structures

(The Story of Data Structures)

Why moving from vectors ⇒ singly list ⇒ doubly list? Problem and
advantage?
4: Problems Strategies with Linked Structures

Dynamic Recursive Linked structures

(The Story of Data Structures)

Problem : Given a linked Problem : Given a linked


list, how can you delete list detect if it is a circular
the middle element of the linked list?
linked list?
4: Problems Strategies with Linked Structures

Trees

Why we moved from linked list to binary Search Trees?


(The Story of Data Structures)

What are Inorder (LNR/RNL), Postorder(LRN/RLN) or Preorder (NLR/NRL)


traversals of BST and What are their applications?
4: Problems Strategies with Linked Structures

with
Dynamic Recursive Linked structures
(The Story of Data Structures)

Applications:

Problem (Same Tree Detection): bool isSameTree(TreeNode* p, TreeNode* q)


https://leetcode.com/problems/same-tree/description/
4 : Problems Strategies

with
Dynamic Recursive Linked structures
(The Story of Data Structures)

Applications:

Problem (Same Tree Detection): bool isSameTree(TreeNode* p, TreeNode* q)


https://leetcode.com/problems/same-tree/description/

Problem (Symmetric Tree Detection): bool isSymmetric(TreeNode* p)


https://leetcode.com/problems/symmetric-tree/description/
4 : Problems Strategies

with
Dynamic Recursive Linked structures
(The Story of Data Structures)

STL::vector, deque, map, set, multiset, multimap, stack


queues, priority queues, unordered_map
and
their iterators
4 : Problems Strategies

with
Dynamic Recursive Linked structures
(The Story of Data Structures)

STL::vector, deque, map, set, multiset, multimap, stack


queues, priority queues, unordered_map
and
their iterators

https://startuppakistan.com.pk/india-6th-bangladesh-29th-pakistan-lags-at-disappointing-1336th-in-google-coding-contest
5 : Techniques to tackle Optimization Problems

● The apparatus:
○ Divide and Conquer
○ Dynamic Programming
○ Greedy Techniques
6: Graphs based problems

● Graphs Modeling of dependency based problems


● Designing Implementing Mini
● Designing
7-8

Domain Knowledge for a programming interview

● Databases
○ OOP to ER diagrams, Normalizations
● Operating System
○ Synchronization problems
We might talk about

Advanced Data Structures and Massive Data Handling

● Transition from RAM model to I/O Model

○ Introducing data structures which are based on I/O Model

○ Sorting on Disk?
Problem Solving
Not just Coding
You have two identical eggs and you want to determine the highest floor from
which you can drop an egg without it breaking. You are given 100 floors in a
building to work with.

➢ Assumption: if an egg breaks when dropped from a certain floor X, it will


also break if dropped from any higher floor >X. Similarly If an egg survives
the fall from X, it will not break from any lesser height floor <X.

What is the minimum number of attempts needed to find the highest floor from
which you can drop an egg without it breaking, and what strategy would you
use?
Mock Interviews

What is the difference between appearing for the


interview With and Without preparation?
CCI@UMT
https://seedprogramming.org/ Click Here ⇒ WhatsApp Group

https://www.seedprogramming.org/courses/cracking-the-coding-interview/ https://github.com/UsmanGill-UG/ https://neetcode.io/roadmap


CCI - Recorded Course Details
For CCI Course Recording - register here:

Link

youtube facebook instagram Linkedin 0332 6660830 seedprogramming.org whatsapp Channel


Questions
For Recorded Course’s Register here:
https://www.seedprogramming.org/courses/cracking-the-coding-interview/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy