>Digital-flame
In 1983 Computing was anyones' game
Skip to content
Home
Langs
Delphi
Basics
Delphi.Masterpiece
UniGui
FireDAC
FireMonkey
Indy
DataSnap
FastReport
C#
Syntax&Basics
ADO.NET
Entity
Algo
MVC
C#. TelegramCommands
Java
JS
React
Js. Basics
Webpack
ExtJS Framework
jQuery
React
TypeScript
CSS
InterviewTasks
PHP
HTML
DB
SQL
Projecting
MySQL
Postgres
Delphi & DBExpress
Delphi & FireDAC
VersionControl
Git
SVN
Algo
Algo.Java
C#
Other
DesignPatterns
ToLearn
Author
Other
IDE and other tools
IIS
Docker
Music
Reading Books
R.C.Martin Clean architecture, some remarks from reading
SQL.Tips
TechInterview
←
Git commands
С#. Algo. BinarySearch
→
C#. Algorithms. Greatest common divisor
Posted on
20.09.2017
by
Stanislav_Panteleev
Git
C#
public static int gcd(int p, int q) { if (q == 0) return p; int r = p % q; return gcd(q, r); }
1
2
3
4
5
6
public
static
int
gcd
(
int
p
,
int
q
)
{
if
(
q
==
0
)
return
p
;
int
r
=
p
%
q
;
return
gcd
(
q
,
r
)
;
}
This entry was posted in
C#
. Bookmark the
permalink
.
←
Git commands
С#. Algo. BinarySearch
→
Search for:
MY PROJECTS
Recent Posts
Database.Middle.What are surroget keys ?
Database.Middle.Explain the difference between OLTP and OLAP.
Database.Middle.Partitions and sharding, differenes
Database.Middle.do i see different tables in some sql explorer like dataGrip, for example ?
Database.Middle.How does database partitioning work?
Database.Middle.What is a trigger? How and when would you use it?
Database.Middle.What is the difference between ROW_NUMBER(), RANK(), and DENSE_RANK()?
Database.Middle.What are CTEs (Common Table Expressions)?
Database.Middle.If i don’t use ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW, so i take all rows ?
Database.Middle.WindowFunctions.Explain ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
Database.Total.Give examples with Sum(), Avg(), Max()
Database.Middle.What is window function?
Database.Middle.Pagination.SeekMethod.What if some rows were deleted ?
Database.Middle.Why, when we seek for pages no shifting from inserts/deletes on other rows ?
Database.Middle.What is the Seek Method?
Database.Middle.How would you implement pagination in SQL?
Database.Middle.What is eventual consistency?
Database.Middle.Explain the concept of sharding in databases.
Database.Middle.MaterializedView
Database.Middle.How can you detect and resolve deadlocks?
Categories
Aptana
Azure
C#
DataSnap
DBExpress
Delphi
Delphi и сети
Delphi. Язык программирования
ExtJS
FastReport
FireDAC
FireMonkey
GIT
ICS
IDE
IIS
Indy
InnoSetup
javascript
jQuery
JSON
LiveBindings
MSHTML
MySQL
PHP
REST
Ribbons
SMS
SQL инструкции
SVN
TRichView
UniGui
WebBroker
WinAPI
Windows
Алгоритмы
Без рубрики
Деревья
Ищу ответ
Компонентостроение
Мои компоненты
Начальный уровень
Обработка исключений
Парсинг
Потоки(Threads)
Регулярные выражения
Тестирование приложений