Hike interview questions

153 questions from 15 interviews · updated from reports 2014-2023

Practise Hike-style

About

Hike is an Indian internet company known for consumer mobile apps, including Hike Messenger and the Rush gaming platform. In India, it has hired for roles such as Software Engineer, SDE-1, Android Developer, backend engineer, and other app development positions.

The roles that come up most are Software Engineer, SDE-1 and Android Developer. This covers 15 candidate interviews reported from 2014 to 2023. Most sat it at entry level (14 of 15 that recorded a level). Among the 7 that recorded either route, arrivals split between campus drives (1, 14%) and off-campus applications (6, 86%). Most questions fall under DSA and CS fundamentals.

Category
Difficulty
Round

Interview questions

Q. Reverse a linked list

asked 2xeasyLinked listsTechnical2015

Ans. Reverse a linked list by iterating through it and changing each node’s next pointer to point to the previous node. Keep three pointers: previous, current, and next, so you do not lose the rest of the list. At the end, previous is the new head. Time complexity is O(n), space complexity is O(1).

Q. Shuffle a given array using the Fisher-Yates shuffle algorithm

asked 2xeasyArraysTechnical2017

Ans. Shuffle the array in place by scanning from the last index down to 1, choosing a random index between 0 and the current index inclusive, and swapping those two elements. This uses the original array as the data structure. It runs in O(n) time and O(1) extra space, producing an unbiased shuffle if the random choice is uniform.

Q. Design a URL shortener service

asked 1xmediumScalable systemsTechnical2015

Ans. Build a service that maps a short code to a long URL, with APIs to create, redirect, and optionally expire links. Store mappings in a durable key value store, generate unique codes using base62 over an ID or random token, cache hot redirects, and use 301 or 302 depending on analytics needs.

Q. Compare inheritance in C++ and Java.

asked 1xmediumOOPTechnical2014

Ans. C++ supports multiple inheritance of classes, while Java allows a class to extend only one class but implement multiple interfaces. C++ inheritance can be public, protected, or private, affecting subtyping and member access. Java inheritance is always reference based, uses interfaces for multiple types, and all non-static methods are virtual by default.

Q. Find the median of a stream of numbers.

asked 1xmediumHeapsTechnical2014

Ans. Use two heaps: a max heap for the lower half of numbers and a min heap for the upper half. Keep their sizes equal, or let one heap have one extra element. Insert in O(log n), rebalance after each insert, and get the median in O(1) from the heap tops.

Q. Find the n/m-th element of a linked list

asked 1xmediumLinked listsTechnical2015

Ans. Use one traversal with a counter and a second pointer to find the floor of length divided by m. As you scan the list, advance the result pointer by one every time the counter reaches a multiple of m. This avoids storing nodes, uses O(1) extra space, and takes O(n) time.

Q. Explain various CPU scheduling algorithms

asked 1xmediumOperating systemsTechnical2015

Ans. CPU scheduling algorithms decide which ready process gets the CPU next. Common ones are FCFS, which runs in arrival order; SJF, which picks the shortest job; priority scheduling, which picks highest priority; round robin, which gives each process a time slice; and multilevel queue or feedback queue, which separate jobs by class or behaviour.

Q. Reverse alternate levels of a binary tree.

asked 1xmediumTreesTechnical2015

Ans. Reverse alternate levels by keeping the tree structure unchanged and swapping node values on every odd level. Do a level order traversal with a queue, collect nodes of the current level, and if the level is odd, swap values from both ends. This takes O(n) time and O(w) space.

Q. Why is a synchronized block needed in Java?

asked 1xmediumOOPTechnical2014

Ans. A synchronized block is needed to protect shared mutable data from concurrent access by multiple threads. It ensures only one thread at a time can execute the guarded code using the same lock. It also provides memory visibility, so changes made by one thread become visible to others acquiring that lock.

Q. Explain how HashMap works internally in Java.

asked 1xmediumOOPTechnical2015

Ans. A Java HashMap stores key value pairs in an array of buckets, using the key’s hashCode to choose a bucket and equals to find the exact key. Collisions are handled by a linked list, or a balanced tree after enough entries. It resizes when the load factor threshold is crossed, giving average constant time operations.

Q. Reverse every K nodes in a singly linked list

asked 1xmediumLinked listsOnline test2014

Ans. Reverse each complete block of K nodes by first finding the Kth node, then reversing pointers within that block and reconnecting it to the previous and next parts of the list. Use a dummy head to handle the first group cleanly. Leave fewer than K remaining nodes unchanged. Time is O(n), space is O(1).

Q. Design a file sharing mechanism between two users.

asked 1xmediumDistributed systemsSystem design2015

Ans. Use object storage for files, a metadata service for ownership and sharing, and short-lived signed URLs for upload and download. User A uploads a file, the service stores metadata, grants User B permission, and notifies them. The key detail is enforcing access on every request using authenticated identity, permissions, expiry, and audit logging.

Q. Explain concepts related to multithreading in Java.

asked 1xmediumOOPTechnical2014

Ans. Multithreading in Java means running multiple threads within one process to perform work concurrently. Key concepts include Thread, Runnable or Callable, thread lifecycle, scheduling, shared memory, synchronisation, locks, volatile, wait and notify, executors, futures and concurrent collections. The main concern is thread safety, avoiding race conditions, deadlocks and visibility bugs.

Q. How does image caching work in Android applications?

asked 1xmediumAndroidTechnical2014

Ans. Image caching in Android stores downloaded or decoded images so they can be reused instead of fetched and processed again. Usually an app checks a memory cache first, often an LRU cache, then a disk cache, and only then the network. Libraries like Glide, Coil, and Picasso manage this automatically using cache keys such as URLs.

Q. Explain the CAP theorem and where Cassandra fits in it

asked 1xmediumDBMSTechnical2017

Ans. CAP theorem says a distributed system can only fully guarantee two of consistency, availability and partition tolerance during a network partition. Cassandra is usually classified as AP: it stays available and partition tolerant, accepting eventual consistency. The key detail is tunable consistency, where reads and writes can use quorum levels to trade availability for stronger consistency.

Q. Implement Java 8 Future and a related concurrency class

asked 1xmediumConcurrencyTechnical2017

Ans. Implement Future with a shared state object containing result, exception, cancelled and done flags, protected by a lock and condition variable. get waits until done, then returns the result or throws the stored exception or CancellationException. cancel atomically marks cancelled if not started. FutureTask adds a Callable and run executes it once. Operations are O(1).

Q. Design and implement an LRU (Least Recently Used) cache.

asked 1xmediumDesignTechnical2017

Ans. Use a hash map plus a doubly linked list to implement an LRU cache. The map gives O(1) access from key to node, and the list keeps usage order. On get or put, move the node to the front. When capacity is exceeded, remove the tail in O(1).

Q. Explain ConcurrentHashMap and how it differs from HashMap.

asked 1xmediumOOPTechnical2015

Ans. ConcurrentHashMap is a thread-safe hash table designed for concurrent reads and updates, while HashMap is not thread-safe and should not be modified by multiple threads without external synchronisation. ConcurrentHashMap reduces contention by locking or coordinating only parts of the table, allows high concurrency, and does not allow null keys or values.

Q. Explain different caching mechanisms available in Android.

asked 1xmediumAndroidTechnical2014

Ans. Android caching is commonly done with in-memory caches, disk caches, and network response caches. In-memory caching uses LruCache for fast access to bitmaps or objects but is cleared under memory pressure. Disk caching stores files or database data for persistence. HTTP caching uses cache headers through clients like OkHttp to avoid unnecessary network calls.

Q. How would you analyze the usage history of an application?

asked 1xmediumAnalytics system designTechnical2015

Ans. I would collect structured event logs for key user actions, store them in an analytics pipeline, and analyse them by user, feature, time, device, and outcome. The most important detail is defining clear metrics first, such as active users, retention, session length, conversion, error rates, and feature adoption, so the history answers product and reliability questions.

Q. Convert a Binary Search Tree into a sorted doubly linked list

asked 1xmediumTreesTechnical2015

Ans. Do an in-order traversal and link nodes as you visit them, because in-order traversal of a BST gives sorted order. Keep a previous pointer and a head pointer. For each node, connect previous.right to current and current.left to previous. This is in-place, takes O(n) time and O(h) recursion space.

Q. Explain processes, semaphores, and basic networking concepts.

asked 1xmediumOperating systemsTechnical2014

Ans. Processes are running program instances, semaphores control access to shared resources, and networking lets machines communicate using agreed protocols. A process has its own memory and resources. A semaphore is usually a counter used for synchronisation and mutual exclusion. Basic networking includes IP addressing, ports, TCP or UDP, DNS, routing, and client-server communication.

Q. Perform level order traversal of a binary tree in spiral form

asked 1xmediumTreesTechnical2017

Ans. Use two stacks to traverse the tree level by level while alternating direction. Push the root into one stack, then process nodes from the current stack and push their children into the other stack in left-right or right-left order depending on the level. Swap stacks after each level. Time is O(n), space is O(n).

Q. Explain memory allocation for a 2D array using pointers in C++.

asked 1xmediumMemoryTechnical2014

Ans. A 2D array can be allocated using a pointer to pointers, where the first allocation creates an array of row pointers and each row pointer is then allocated an array of elements. The key detail is ownership: free every row first, then free the row pointer array to avoid leaks.

Q. Design a stack that supports push, pop, and getMin() in O(1) time.

asked 1xmediumStackTechnical2019

Ans. Use two stacks: one normal stack for all values and one min stack that tracks the current minimum. On push, also push the value to the min stack if it is smaller than or equal to the current minimum. On pop, remove from min stack if the popped value equals its top. getMin returns min stack top.

Q. Discuss hashing techniques and operating system related algorithms.

asked 1xmediumOperating systemsTechnical2014

Ans. Hashing maps keys to table indexes using functions such as division, multiplication or universal hashing, with collisions handled by chaining or open addressing. The key concern is keeping lookups near constant time through good distribution and load factor control. Operating systems use algorithms for CPU scheduling, page replacement, disk scheduling and deadlock handling.

Q. Given preorder and postorder traversals of a BST, construct the tree.

asked 1xmediumTreesOnline test2014

Ans. Use the BST property to construct the tree from preorder alone, assuming distinct keys. Take the next preorder value as root, then recursively build its left subtree with values less than root and right subtree with values greater than root, using min and max bounds. Postorder is only needed to verify. Time complexity is O(n).

Q. Define a doubly linked list and write a program to reverse it in-place

asked 1xmediumLinked listsTechnical2015

Ans. A doubly linked list is a linear data structure where each node stores data plus links to both the previous and next nodes. To reverse it in-place, traverse the list once and swap each node’s previous and next pointers, then update the head to the last processed node. This uses O(1) extra space and O(n) time.

Q. Explain basics of distributed storage, parallel processing, and Hadoop

asked 1xmediumDistributed systemsTechnical2015

Ans. Distributed storage splits data across many machines, while parallel processing runs computation on those machines at the same time. Hadoop combines these ideas: HDFS stores large files in replicated blocks across a cluster, and MapReduce processes data near where it is stored. This improves scalability, fault tolerance, and throughput for big data workloads.

Q. Explain SoftReference and WeakReference in Android and their use cases.

asked 1xmediumMemoryTechnical2014

Ans. SoftReference keeps an object until the runtime needs memory, while WeakReference allows it to be collected as soon as no strong references remain. In Android, SoftReference is rarely recommended for caching because collection is unpredictable, so use LruCache. WeakReference is useful for avoiding leaks, such as referencing Activities from handlers or callbacks.

Q. Search an element in a sorted array that has been rotated at some pivot.

asked 1xmediumBinary searchTechnical2017

Ans. Use modified binary search: compare the middle with the ends to identify which half is normally sorted, then decide whether the target lies in that half or the other half. Move the search bounds accordingly. This keeps the search O(log n) time and O(1) space for arrays with distinct elements.

Q. Find all nodes at a given distance K from a target node in a binary tree.

asked 1xmediumTreesTechnical2017

Ans. Treat the binary tree as an undirected graph and run BFS from the target node until distance K. First build a parent map with DFS or BFS, so each node can move to left child, right child and parent. Use a visited set to avoid cycles. Time is O(n) and space is O(n).

Q. Given a number, find the next higher number formed using the same digits.

asked 1xmediumGreedyTechnical2014

Ans. Find the next lexicographic permutation of the digits. Scan from right to left to find the first digit smaller than the digit after it, swap it with the smallest larger digit to its right, then reverse the suffix. If no such digit exists, no higher number can be formed. Time is O(n).

Q. Given two linked lists, determine if they merge and find the merging point.

asked 1xmediumLinked listsTechnical2014

Ans. Use two pointers, one starting at each list head, and advance them one node at a time. When a pointer reaches the end, move it to the other list’s head. If the lists merge, the pointers meet at the merge node; otherwise both become null. This is O(m+n) time and O(1) space.

Q. Print all the corner nodes of a binary tree clockwise starting from the root

asked 1xmediumTreesTechnical2015

Ans. Print the root, then the right boundary from top to bottom, then all leaf nodes from right to left, then the left boundary from bottom to top. Exclude leaf nodes while printing boundaries to avoid duplicates. Use DFS recursion or stacks. The traversal visits each node once, so time is O(n).

Q. Write SQL queries for the given database tables provided by the interviewer.

asked 1xmediumSQLTechnical2014

Ans. I would map the required output to the tables, identify primary and foreign keys, then build the query using joins, filters, grouping, and ordering as needed. The key detail is to avoid guessing relationships and to check duplicates, nulls, and aggregation level. Performance mainly depends on indexes on join and filter columns.

Q. What problems arise in multithreaded applications and how can they be solved?

asked 1xmediumOperating systemsTechnical2015

Ans. Multithreaded applications can suffer from race conditions, deadlocks, livelocks, starvation, data visibility bugs, and hard-to-reproduce timing errors. They are solved by protecting shared state with locks or atomic operations, using thread-safe data structures, keeping lock ordering consistent, reducing shared mutable state, and testing with stress and concurrency-focused tools.

Q. Implement inorder traversal of a binary tree with and without using recursion.

asked 1xmediumTreesTechnical2014

Ans. Use left, root, right order. Recursively, traverse the left subtree, visit the current node, then traverse the right subtree. Iteratively, use an explicit stack: push all left nodes, pop and visit, then move to the right child. Both take O(n) time. Space is O(h), where h is tree height.

Q. Calculate the velocity of a swipe gesture performed by a user on a mobile screen.

asked 1xmediumLogical reasoningTechnical2014

Ans. Velocity is the swipe displacement divided by the time taken. Record the start point and time, and the end point and time. Compute dx and dy, then speed is sqrt(dx² + dy²) / dt, usually in pixels per second. Direction is atan2(dy, dx). Convert pixels to metres using screen DPI if needed.

Q. Nut and bolt problem: match nuts and bolts efficiently without direct comparisons

asked 1xmediumSortingTechnical2015

Ans. Use a quicksort-style partition using only nut-to-bolt comparisons. Pick a bolt as pivot, partition all nuts around it, which also finds its matching nut, then use that nut to partition the bolts. Recurse on smaller and larger parts. Average time is O(n log n), worst case O(n²), with O(log n) recursion space.

Q. Compare hashing and B-trees, and explain which is better under different use cases

asked 1xmediumDBMSTechnical2015

Ans. Hashing is usually better for exact key lookups, while B-trees are better for ordered data, range queries, and disk-based indexes. A hash table gives average constant-time search, insert, and delete, but has no natural ordering. A B-tree gives logarithmic operations and keeps keys sorted, making it ideal for databases and filesystems.

Q. Deep discussion on NoSQL databases with focus on Couchbase internals like vBuckets

asked 1xmediumDBMSTechnical2017

Ans. Couchbase is a distributed NoSQL document database where data is sharded using vBuckets, not directly by physical nodes. A key is hashed to one of 1024 vBuckets, and each vBucket is assigned to an active node with optional replicas elsewhere. This indirection makes rebalancing, failover and scaling predictable without rehashing all keys.

Q. Given a 2D binary matrix, find the largest square sub-matrix consisting of all 1s.

asked 1xmediumDynamic programmingOnline test2019

Ans. Use dynamic programming where dp[i][j] is the side length of the largest all-1 square ending at cell i, j. If matrix[i][j] is 1, dp[i][j] equals 1 plus the minimum of top, left and top-left dp values; otherwise it is 0. Track the maximum. Time is O(rows × cols).

Q. Merge two sorted linked lists. Follow-up: merge k sorted linked lists efficiently.

asked 1xmediumLinked listsTechnical2019

Ans. Merge two sorted linked lists by walking both with two pointers and appending the smaller current node to a dummy-headed result list. When one list ends, append the remainder of the other. This is O(n + m) time and O(1) extra space. For k sorted lists, use a min-heap of current heads for O(N log k) time.

Q. Design a system where users share images and the system tracks the top trending images

asked 1xmediumScalable systemsTechnical2017

Ans. Build an image sharing service with object storage for images, a database for metadata, a CDN for delivery, and an event stream for views, likes, shares, and comments. Consumers aggregate events into time-windowed counters, for example last hour and day, and maintain a sorted top-N cache. Use deduplication and decay to reduce spam and stale trends.

Q. Explain how HashMap is implemented in Java, including collision handling and resizing.

asked 1xmediumOOPTechnical2019

Ans. Java HashMap is implemented as an array of buckets, where each key’s hashCode is spread and mapped to an index. Collisions are handled by storing entries in a linked list, or a red-black tree when a bucket becomes large. When size exceeds capacity times load factor, usually 0.75, the table doubles and entries are redistributed.

Q. Word Break problem: determine if a string can be segmented into valid dictionary words

asked 1xmediumDynamic programmingTechnical2017

Ans. Use dynamic programming where dp[i] means the prefix ending at index i can be segmented into dictionary words. Put the dictionary in a hash set, set dp[0] to true, and for each i check earlier cut positions j where dp[j] is true and s[j:i] is a word. Time is O(n²), ignoring substring cost.

Q. Generate all corner test cases for a spiral (helix) matrix printing program for an N×M matrix

asked 1xmediumArraysTechnical2014

Ans. Test empty, 1×1, single row, single column, square odd and even sizes, rectangular wide and tall matrices, and matrices with negative or duplicate values. Also test 2×2, 2×3, and 3×2, because boundary updates often fail there. Verify clockwise or anticlockwise order matches the specification exactly.

Q. Given a sorted array that is rotated K times, sort it in O(n) time without using extra space.

asked 1xmediumArraysTechnical2014

Ans. Rotate the array back by K positions in the opposite direction, in place. Normalise K as K % n, then use the reversal method: reverse one part, reverse the other part, then reverse the whole array. This restores sorted order in O(n) time and O(1) extra space.

Q. Design a leaderboard system that reports the rank of a user along with +/- 5 neighboring users

asked 1xmediumRanking systemsTechnical2017

Ans. Use a sorted set keyed by score, for example Redis ZSET, to store user ids and scores, then query the user’s rank and fetch the range from rank minus 5 to rank plus 5. Updates are logarithmic, rank lookup is logarithmic, and neighbour fetch is logarithmic plus the 11 returned users.

Q. What problems occur when multiple threads update a stack concurrently and how can they be handled?

asked 1xmediumOperating systemsTechnical2015

Ans. Concurrent updates can corrupt the stack, causing lost pushes or pops, broken links, incorrect size, duplicate removals, or reading freed nodes. Handle this by synchronising every update with a mutex, or by using a lock-free stack with atomic compare-and-swap. Lock-free designs must also address ABA and safe memory reclamation.

Q. Minimum number of platforms required for a railway or bus station given arrival and departure times

asked 1xmediumGreedyOnline test2015

Ans. Sort arrival times and departure times separately, then scan both lists with two pointers, counting platforms in use and tracking the maximum count. When the next arrival is before or equal to the next departure, add a platform; otherwise free one. This uses arrays only and runs in O(n log n) time.

Q. Given a bitonic array (first increasing then decreasing), search for a given number in O(log n) time.

asked 1xmediumBinary searchTechnical2014

Ans. Find the peak with binary search, then binary search both sides with the correct ordering. Compare mid with mid + 1 to decide whether the peak is to the right or left. If the peak is not the target, search the increasing left half normally and the decreasing right half with reversed comparisons. This is O(log n).

Q. Given two arrays, sort the first array according to the relative ordering defined by the second array.

asked 1xmediumSortingTechnical2019

Ans. Count frequencies of elements in the first array, then output elements in the order they appear in the second array, using those counts. Any remaining elements not present in the second array are appended in ascending order. Use a hash map for counts. Time complexity is O(n + m + r log r), where r is remaining distinct elements.

Q. 100 people are standing in a circle with a gun; the first person kills the second and passes the gun. Who survives?

asked 1xmediumLogical reasoningTechnical2015

Ans. Person 73 survives. Number people 1 to 100. Since person 1 kills person 2, every even-numbered person dies first. For this Josephus problem with step 2, write 100 as 64 plus 36, where 64 is the largest power of 2 below 100. The survivor is 2 × 36 + 1 = 73.

Q. Solve the puzzle: Three ants are on the vertices of a triangle and start moving randomly along the edges. What is the probability that they do not collide?

asked 1xmediumProbabilityTechnical2014

Ans. Each ant has two possible directions around the triangle, so there are 2^3 = 8 equally likely direction choices. They avoid collision only if all three move clockwise or all three move anticlockwise. Those are 2 favourable cases. Therefore, the probability that they do not collide is 2/8 = 1/4.

Q. How will you handle pressure at work?

asked 1xunknownConflict resolutionHR2023

Ans. Choose a real example where pressure was high but manageable, such as a tight deadline, outage, or competing priorities. Emphasise how you stayed calm, clarified priorities, communicated early, and took practical action. Interviewers listen for resilience, judgement, ownership, and evidence that pressure improves your focus rather than causing panic or blame.

Q. Is India ready for electric vehicles (EVs)?

asked 1xunknownVerbalGroup discussion2023

Ans. A strong answer should take a balanced view: India is progressing, but readiness varies by city, income group, and use case. Pick examples such as two-wheelers, buses, delivery fleets, charging gaps, battery costs, and policy support. Emphasise practical judgement, not hype. Interviewers listen for awareness of infrastructure, affordability, regulation, and adoption barriers.

Q. General aptitude and logical reasoning questions.

asked 1xunknownLogical reasoningOnline test2015

Ans. Break the problem into given facts, required result, and constraints. Identify the question type, such as ratio, percentage, sequence, coding, direction, or arrangement. Use a standard formula or draw a simple table or diagram. Eliminate impossible options, check units, and verify the answer by substituting it back into the conditions.

Q. How will you add value to the country through your work?

asked 1xunknownLeadershipHR2023

Ans. Choose work that links your skills to a real national need, such as jobs, innovation, public service, sustainability, tax contribution, or knowledge transfer. Emphasise practical impact, not patriotism alone. Show you understand the sector and can create measurable benefits. Interviewers listen for credibility, long-term commitment, and awareness of wider social value.

Showing 60 of 153 questions. Ranked by how often the same question came back across interviews.

Practise a Hike-style interview

A spoken interview built from these questions, scored when you finish; the feedback is yours.

Start practising

When you are ready, record The One: a single interview hiring teams watch, so you stop repeating first rounds.

Common questions

What questions does Hike ask?

Candidate interviews most often cover DSA (47%) and CS fundamentals (36%).

How many rounds does Hike interview have?

Candidate interviews show an average of 4.3 rounds per experience, with a typical sequence of Online test → Technical → Technical. Individual interview paths can vary.

Is the Hike interview hard?

Among questions with a recorded difficulty, the mix is easy 32%, medium 51%, hard 17%.