Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6f553f9

Browse files
1 parent0ef0417 commit6f553f9

File tree

9 files changed

+71
-11
lines changed

9 files changed

+71
-11
lines changed

‎main/dynamic_programming/knuth-optimization.html‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6635,6 +6635,16 @@
66356635

66366636

66376637

6638+
6639+
6640+
6641+
6642+
6643+
6644+
6645+
6646+
6647+
66386648

66396649

66406650

‎main/feed_json_updated.json‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎main/feed_rss_created.xml‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎main/feed_rss_updated.xml‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎main/graph/01_bfs.html‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6584,6 +6584,16 @@
65846584

65856585

65866586

6587+
6588+
6589+
6590+
6591+
6592+
6593+
6594+
6595+
6596+
65876597

65886598

65896599

‎main/graph/bellman_ford.html‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6659,6 +6659,16 @@
66596659

66606660

66616661

6662+
6663+
6664+
6665+
6666+
6667+
6668+
6669+
6670+
6671+
66626672

66636673

66646674

‎main/graph/finding-negative-cycle-in-graph.html‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6614,6 +6614,16 @@
66146614

66156615

66166616

6617+
6618+
6619+
6620+
6621+
6622+
6623+
6624+
6625+
6626+
66176627

66186628

66196629

‎main/others/tortoise_and_hare.html‎

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6625,6 +6625,22 @@
66256625

66266626

66276627

6628+
6629+
6630+
6631+
6632+
6633+
6634+
6635+
6636+
6637+
6638+
6639+
6640+
6641+
6642+
6643+
66286644

66296645

66306646

@@ -6687,6 +6703,10 @@
66876703

66886704

66896705

6706+
6707+
6708+
6709+
66906710

66916711

66926712

@@ -6699,7 +6719,7 @@
66996719
<ulclass="metadata page-metadata"data-bi-name="page info"lang="en-us"dir="ltr">
67006720

67016721
Last update:
6702-
<spanclass="git-revision-date-localized-plugin git-revision-date-localized-plugin-date"title="April 15, 202502:32:08 UTC">April 15, 2025</span>&emsp;
6722+
<spanclass="git-revision-date-localized-plugin git-revision-date-localized-plugin-date"title="September 21, 202500:17:26 UTC">September 21, 2025</span>&emsp;
67036723

67046724
<!-- Tags -->
67056725

@@ -6722,8 +6742,8 @@ <h1 id="floyds-linked-list-cycle-finding-algorithm">Floyd's Linked List Cycle Fi
67226742
<p>Here we need to find out the point<strong>C</strong>, i.e the starting point of the cycle.</p>
67236743
<h2id="proposed-algorithm">Proposed algorithm<aclass="headerlink"href="#proposed-algorithm"title="Permanent link">&para;</a></h2>
67246744
<p>The algorithm is called<strong>Floyd’s Cycle Algorithm or Tortoise And Hare algorithm</strong>.
6725-
In order to figure out the starting point of the cycle, we need to figure outof the thecycle even exists or not.
6726-
So, it involved two steps:
6745+
In order to figure out the starting point of the cycle, we need to figure outif acycle even exists.
6746+
This involves two steps:
67276747
1. Figure out the presence of the cycle.
67286748
2. Find out the starting point of the cycle.</p>
67296749
<h3id="step-1-presence-of-the-cycle">Step 1: Presence of the cycle<aclass="headerlink"href="#step-1-presence-of-the-cycle"title="Permanent link">&para;</a></h3>
@@ -6733,14 +6753,14 @@ <h3 id="step-1-presence-of-the-cycle">Step 1: Presence of the cycle<a class="hea
67336753
<li><spanclass="arithmatex">$slow$</span> will move one step at a time.</li>
67346754
<li><spanclass="arithmatex">$fast$</span> will move two steps at a time. (twice as speed as<spanclass="arithmatex">$slow$</span> pointer).</li>
67356755
<li>Check if at any point they point to the same node before any one(or both) reach null.</li>
6736-
<li>If they point toany same node at any point of their journey, itwould indicatethatthe cycle indeed exists in the linked list.</li>
6737-
<li>If we get null, itwould indicate that the linked list has no cycle.</li>
6756+
<li>If they point tothe same node at any point of their journey, itindicatesthata cycle indeed exists in the linked list.</li>
6757+
<li>If we get null, itindicates that the linked list has no cycle.</li>
67386758
</ol>
67396759
<divstyle="text-align: center;">
67406760
<imgsrc="tortoise_hare_cycle_found.png"alt=""Foundcycle"">
67416761
</div>
67426762

6743-
<p>Now, that we have figured outthat there is a cycle present in the linked list, for the next step we need to find out the starting point of cycle, i.e.,<strong>C</strong>.</p>
6763+
<p>Now, that we have figured outif there is a cycle present in the linked list, for the next step we need to find out the starting point of cycle, i.e.,<strong>C</strong>.</p>
67446764
<h3id="step-2-starting-point-of-the-cycle">Step 2: Starting point of the cycle<aclass="headerlink"href="#step-2-starting-point-of-the-cycle"title="Permanent link">&para;</a></h3>
67456765
<ol>
67466766
<li>Reset the<spanclass="arithmatex">$slow$</span> pointer to the<strong>head</strong> of the linked list.</li>
@@ -6815,7 +6835,7 @@ <h1 id="problems">Problems:<a class="headerlink" href="#problems" title="Permane
68156835

68166836
<ulclass="metadata page-metadata"data-bi-name="page info"lang="en-us"dir="ltr">
68176837
<spanclass="contributors-text">Contributors:</span>
6818-
<ulclass="contributors"data-bi-name="contributors"><li><ahref="https://github.com/sourav15102"title="sourav15102"data-bi-name="contributorprofile"target="_blank">sourav15102</a> (88.43%)</li><li><ahref="https://github.com/mhayter"title="mhayter"data-bi-name="contributorprofile"target="_blank">mhayter</a> (7.44%)</li><li><ahref="https://github.com/kanwaekan"title="kanwaekan"data-bi-name="contributorprofile"target="_blank">kanwaekan</a> (2.48%)</li><li><ahref="https://github.com/ericmiranda7"title="ericmiranda7"data-bi-name="contributorprofile"target="_blank">ericmiranda7</a> (0.83%)</li><li><ahref="https://github.com/toluwalase104"title="toluwalase104"data-bi-name="contributorprofile"target="_blank">toluwalase104</a> (0.83%)</li></ul>
6838+
<ulclass="contributors"data-bi-name="contributors"><li><ahref="https://github.com/sourav15102"title="sourav15102"data-bi-name="contributorprofile"target="_blank">sourav15102</a> (84.3%)</li><li><ahref="https://github.com/mhayter"title="mhayter"data-bi-name="contributorprofile"target="_blank">mhayter</a> (7.44%)</li><li><ahref="https://github.com/arjunUpatel"title="arjunUpatel"data-bi-name="contributorprofile"target="_blank">arjunUpatel</a> (4.13%)</li><li><ahref="https://github.com/kanwaekan"title="kanwaekan"data-bi-name="contributorprofile"target="_blank">kanwaekan</a> (2.48%)</li><li><ahref="https://github.com/ericmiranda7"title="ericmiranda7"data-bi-name="contributorprofile"target="_blank">ericmiranda7</a> (0.83%)</li><li><ahref="https://github.com/toluwalase104"title="toluwalase104"data-bi-name="contributorprofile"target="_blank">toluwalase104</a> (0.83%)</li></ul>
68196839
</ul>
68206840

68216841
</article>

‎main/search/search_index.json‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp