Parallel or Perpendicular? || @GeeksforGeeks || Problem Solving || Solution || Gorakh Codes

Published: 28 August 2023
on channel: gorakhcodes
48
like

Problem Link : https://practice.geeksforgeeks.org/pr...[]=-2&sortBy=submissions

Name : Parallel or Perpendicular?


=========================================================

Description :

Given two force vectors, find out whether they are parallel, perpendicular or neither. Let the first vector be A = a1 i +a2 j + a3 k and the second vector be B = b1 i + b2 j + b3 k.

A.B = a1 * b1 + a2 * b2 + a3 * b3

A x B = (a2 * b3 - a3 * b2) i - (a1 * b3 - b1* a3) j + (a1 * b2 - a2 * b1) k

|A|2 = a12 + a22 + a32

If A.B = 0, then A and B are perpendicular.

If |A X B|2 = 0, then A and B are parallel.


=========================================================

Please Like, Comment and Share the Video among your friends.

Timestamps:

00:00 - Intro
00:06 - Approach
01:47 - Code
04:05 - Outro

Also, Subscribe if you haven't already! :)

#datastructure,
#algorithem,
#computerscience
#prepareyourself
#cpp
#array
#geeksforgeekssolution
#leetcodesolution
#arraysolutioninhindi
#datastructureinhindi
#GFGPractice #GeeksforGeeks #PracticeProblems #codingquestions


On this page of the site you can watch the video online Parallel or Perpendicular? || @GeeksforGeeks || Problem Solving || Solution || Gorakh Codes with a duration of hours minute second in good quality, which was uploaded by the user gorakhcodes 28 August 2023, share the link with friends and acquaintances, this video has already been watched 48 times on youtube and it was liked by like viewers. Enjoy your viewing!