---
title: "Discussion on \"LeetCode 704: Binary Search — Step-by-Step Visual Trace\" | Hashnode"
description: "Discussion on \"LeetCode 704: Binary Search — Step-by-Step Visual Trace\". Given a sorted array of integers and a target value, return the index of the target if it exists in the array, otherwise return -1. The algorithm must run in O(log n) time complexity."
url: "https://hashnode.com/posts/binary-search-visualization/69d7d1e91cf15606b2600926"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [LeetCode 704: Binary Search — Step-by-Step Visual Trace](https://blog.tracelit.dev/binary-search-visualization?utm_source=hashnode&utm_medium=feed)

Given a sorted array of integers and a target value, return the index of the target if it exists in the array, otherwise return -1. The algorithm must run in O(log n) time complexity.

Apr 9 · 1 min read · blog.tracelit.dev  
Read the article

-   [#algorithms](https://hashnode.com/tag/algorithms)
-   [#leetcode](https://hashnode.com/tag/leetcode)

## Written by

[tracelit](https://hashnode.com/@tracelit)

@tracelit

  
[View profile](https://hashnode.com/@tracelit)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
