Swap two numbers | Code Before DSA #9 | Logic Building Series for Beginners

Опубликовано: 25 Июль 2026
на канале: ShubhDEVs
41
4

Welcome to Code Before DSA - a series designed to help you strengthen your logic and problem-solving skills before diving into Data Structures & Algorithms!

In this episode (#9), we’ll learn how to swap the values of two variables, with & without using a third/temp variable using C++. (Code Available in other languages too on Github!)

💻 GitHub Repository (All Questions + Code):
👉 https://github.com/Shubhashish-Chakra...

👉 More usefull links/resources: https://shubhdevs.cc.cc
👉 Reach me out: https://imshubh.site

🎬 Watch the entire Code Before DSA playlist:
👉    • Code Before DSA - Logic building Series fo...  

🔔 Don’t forget to:
Like the video❤️
Comment your Questions and doubts💬
Subscribe for more coding tutorials💡

🎬Timestamps:

00:00 - Start
00:50 - Understanding the Problem
02:42 - Part-1: With Using a Third Variable Logic!
06:17 - With Using a thrid Variable CODE!
07:05 - BLOOPERS!!
07:10 - Continue to Code!
08:18 - Output for Part1
08:56 - Part-2: WITHOUT Using a Third Variable LOGIC!!
13:09 - Without Using a third variable CODE!
14:07 - OUTPUT for part2
14:29 - OUTRO

#cplusplus #codingforbeginners #swap #swapping #swapnumbers #swaptwonumbers #CodeBeforeDSA #ShubhDevs #logicbuilding #learncoding #programmingseries