Angle Between Hands of a Clock | LeetCode 1344 | C++, Java, Python

preview_player
Показать описание

**** Best Books For Data Structures & Algorithms for Interviews:**********
*****************************************************************************

July LeetCoding Challenge | Problem 14 | Angle Between Hands of a Clock | 14 July,
Facebook Coding Interview question,
google coding interview question,
leetcode,
Angle Between Hands of a Clock,
Angle Between Hands of a Clock c++,
Angle Between Hands of a Clock Java,
Angle Between Hands of a Clock python,
Angle Between Hands of a Clock solution,
1344. Angle Between Hands of a Clock,

#CodingInterview #LeetCode #JulyLeetCodingChallenge #Google #Amazon #AngleBetweenClockHands
Рекомендации по теме
Комментарии
Автор

the most simple and best solution Ive ever seen, amazing explanation thank you sir

wrutzreaction
Автор

Using a math shortcut the formula is (30)*a-(11/2)*b
if hour>=12:
hour = 0
deg= abs((30*hour) - (5.5*minutes))
return min(deg, 360-deg)

siddharthsingh
Автор

Hats off to this man 😂 just a little tweak and go for whatever language you want

munishk.
Автор

Thank you sir first of all delivering the content into common language ..
God bless you for your service

shyamprakashm
Автор

Can you show solution for this please ? Red and Green Balls You have a square grid (NxN). Each cell of the grid has either a red ball or a green ball. Your job is to arrange the balls in such a way that all the red balls are either on or below the main diagonal. The main diagonal starts from cell 1x1 and ends at cell NxN. You have only one move which is to swap adjacent rows. You need to achieve the final arrangement in minimal number of moves. If it is not possible to come to a resolution by swapping then print -1
Input:
First line of input is the number of rows in grid. Rest are the lines in the grid
Ouput:
Minimum number of moves

Input
2
RG
RR
Output
0

Input 2
GR
RG
Output
1

siddharthsingh
Автор

I don’t think that hour % 12 makes a difference, since the hour needle can only go from 0-12, and not 13, 14 etc. Please correct me if I’m wrong.

cloud
Автор

Sir I want to know how the class Solution is instantiated without creating the object of it in main.cpp.??? Solution.angleclock(); how is this working

NishantSharmaddn
Автор

Can't we writh in this way? (30hours_5.5minutes=angles) i think it's more clearly isn't it?

danieldian
Автор

Why (float)(min/60) is not same as (float) min/60

anandmishra
Автор

when we give input 2:00 output should 105 but i got 60

krishanjangid
Автор

Why do u talk as if each sentence is a question?

TheGnarTube