Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #39834

Re: how do you determine whether to start at 0 or 1 ?

Newsgroups comp.lang.java.programmer
Date 2022-11-03 12:52 -0700
References <f79712ee-8e36-44e6-97dd-00b271558671n@googlegroups.com> <slrntm7vog.1qde.avl@logic.at>
Message-ID <7276c6f6-4231-4602-9a36-7d84688400a5n@googlegroups.com> (permalink)
Subject Re: how do you determine whether to start at 0 or 1 ?
From "e.d.pro...@gmail.com" <e.d.programmer@gmail.com>

Show all headers | View raw


> I have no idea what you mean by "LeetCode DSA", and if they have 
> anything to do with Java, so I don't know, what index they feel like 
> having for the first element of their arrays.
> > Hope someone can give me some guidance. 
> > Tks.

Apparently LeetCode is a code training web site and DSA is a test they offer for data structures and algorithms.
The basic array[] variables are all zero based. Some utility object classes are one based.
Indexes for instance in java.sql.PreparedStatement are one based.
When it comes to objects, if there's any question, the answer should be in the javadocs.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

how do you determine whether to start at 0 or 1 ? karen goh <contact@hi5tutors.com> - 2022-10-20 09:35 -0700
  Re: how do you determine whether to start at 0 or 1 ? Andreas Leitgeb <avl@logic.at> - 2022-11-03 17:49 +0000
    Re: how do you determine whether to start at 0 or 1 ? "e.d.pro...@gmail.com" <e.d.programmer@gmail.com> - 2022-11-03 12:52 -0700

csiph-web